Export users from Openfire

The OpenfireExporter plugin allows to export Openfire user data via the Admin Console to a XML file with the XEP-0227 standard format. Later you can import that file in other Jabber servers.

Exported data:

  • User, password
  • Roster list
  • vCard
  • Offline messages

Download

Download the jar file from here.

Installation

Copy the OpenfireExporter.jar into the plugins directory of your Openfire installation. The plugin will then be automatically deployed. To upgrade to a new version, copy the new OpenfireExporter.jar file over the existing file.

Using the Plugin

The plugin is accessed via the "User Import & Export XEP-0227 compliant" sidebar item located under the "Users/Groups" tab in the Admin Console. Note: if you are using a read-only user store such as LDAP or POP3 this plugin will still work with two caveats:

  1. When exporting, the username will be placed in the password element.
  2. Exporting - Select the "Export User Data" option from the user import/export selection page. User data can be exported either to a file or directly to the screen. To export to a file, select the "To File" radio button, enter the name you want your export file to be called in the "Export File Name" and then click on the "Export" button. Note: the plugin will automatically append an ".xml" extension to the file name if it is not already present. To export to the screen, select the "To Screen" radio button and then click on the "Export" button. The user data will be placed in the provided text area.

Example

This is an output example

<?xml version="1.0" encoding="UTF-8"?> 
<server-data xmlns="http://www.xmpp.org/extensions/xep-0227.html#ns"> 
<host jid="example.org"> 
    <user name="testuser1" password="testuser1"> 
        <query xmlns="jabber:iq:roster"> 
            <item jid="testuser1@example.org" name="testuser1" subscription="both"> 
                <group/> 
            </item> 
        </query> 
    </user> 
    <user name="santiago" password="santiago"> 
        <query xmlns="jabber:iq:roster"> 
            <item jid="smartinez@example.org" name="santiago" subscription="both"> 
                <group/> 
            </item> 
        </query> 
        <vCard xmlns="vcard-temp"> 
            <FN>Vidal Santiago Martinez</FN> 
            <NICKNAME>Santiago</NICKNAME> 
            <EMAIL>smartinez@example.org</EMAIL> 
            <URL>http://www.process-one.net</URL> 
        </vCard> 
    </user> 
</host> 
</server-data> 

Syndicate content