Migrate from WPJabber to ejabberd

This tutorial will help you to migrate a WPJabber spool directory with XML files to ejabberd. Since there is no direct way to migrate from WPJabber to ejabberd, you first need to migrate from WPJabber to jabberd 1.4 XML spool files using a set of scripts written in Perl and PHP. Afterwards you can complete the migration process by pointing ejabberd to the directory containing the jabberd 1.4 compatible XML spool files.

  1. Download the Scripts

    Download the scripts archive made by Pinky. The scripts are written in Perl and PHP. With these scripts you can convert WPJabber's XML spool files to jabberd 1.4 compatible spool files. Afterwards you also can verify the migration with a script. Extract the archive:

    tar zxvf wpjabber_to_jabberd14.tar.gz
  2. Install Perl and PHP

    The scripts require Perl and PHP (including the command line interface) to be installed.

  3. Create the Necessary Directories

    Create the necessary directories by executing:

    ./make_directories
  4. Edit first_stage.pl

    Change in the script first_stage.pl three times the string "domain.com" into the domain of your WPJabber server.

  5. Execute the Migration Scripts

    First run first_stage.pl and then run second_stage.php:

    ./first_stage.pl && ./second_stage.php
  6. Rename the Final Spool

    You need to rename the final jabberd 1.4 compatible spool to the name of your WPJabber domain (same as in step 4):

    mv /tmp/transfer/export /tmp/transfer/example.net
  7. Proceed now to the Instructions for Migrating from jabberd 1.4 to ejabberd

    Now that you have a jabberd 1.4 spool directory, you can use the tutorial to migrate from jabberd 1.4 to ejabberd to complete the migration process.

  8. Verify the Migration

    To verify the migration, you can use the script find_differences.php. First, create wpjabber.txt (replace the variable):

    ls -R $WPJABBER_SPOOL/roster/ | grep xml > wpjabber.txt

    Then, dump ejabberd's database to a file by using ejabberdctl (replace the variable):

    ejabberdctl $EJABBERD@example.net dump ejabberd.txt

    Finally, move wpjabber.txt and ejabberd.txt to the same directory as find_differences.php and execute that script.

Syndicate content