Specific Migration Instructions for ejabberd 1.0.0 and Older

Since ejabberd 1.1.0, the ejabberd:config protocol has been replaced with Ad-Hoc Commands. If you need to import users to an older ejabberd version, you can use the tool ejabberdctl, or you can use one of the two methods on this page.

Sending raw XML with any Jabber Client

  1. Create a user account with admin privileges on ejabberd if you do not yet have one. Make sure to not use a username that will be imported from the spool directory.
  2. Login to that account with a Jabber client that provides an XML console (e.g. Tkabber or Psi).
  3. Open the XML console and send a message like this:
    <iq to='SERVER' type='set'>
      <query xmlns='ejabberd:config'
        node='running nodes/NODE/import/dir'>
        <x xmlns='jabber:x:data' type='submit'>
          <field var='path'>
            <value>PATH_TO_SPOOL</value>
          </field>
        </x>
      </query>
    </iq>
    You need to replace:
    • SERVER: Jabber server domain name. For example: example.org
    • NODE: Erlang node name. For example: ejabberd@localhost
    • PATH_TO_SPOOL: full path to the jabberd 1.4 spool directory containing the XML files. Be aware that the spool directory must be named like the hostname of the Jabber IDs you want to import. For instance, if your users have Jabber IDs of the form "user@example.org", the path must look like: /jabberd14/spool/directory/called/example.org/

Using Tkabber

  1. Create a user account with admin privileges on ejabberd if you do not yet have one. Make sure to not use a username that will be imported from the spool directory.
  2. Login with Tkabber to that account.
  3. Open the 'Services' menu and click on 'Discovery'.
  4. Look in the 'Discovery' window for 'Running Nodes', 'ejabberd@hostname' (this may differ), 'Import users from jabberd1.4 spool files', 'Import Directory', and finally 'configure service'.
  5. A new window will appear. Specify the full path to the jabberd 1.4 spool directory containing the XML files. Be aware that the spool directory must be named like the hostname of the Jabber IDs you want to import. For instance, if your users have Jabber IDs of the form "user@example.org", the path must look like: /jabberd14/spool/directory/called/example.org/

Troubleshooting

ejabberd 0.9 has some problems with importing the XML files:

jabberd 1.4 and the script jd2to1 (if you migrate from jabberd2) generate XML files with linebreaks and blank spaces. Version 0.9 of ejabberd has a bug that stops importing the spool directory when it encounters one of such bad formatted XML files. So, if you are using ejabberd 0.9 you must fix this before importing the jabberd 1.4 spool directory.

Open the spool directory containing the XML files, and remove linebreaks and blank spaces:

perl -pi -e "s/\n//g;" *
perl -pi -e "s/\>  \</\>\</g;" *
Syndicate content