Migrate from jabberd2 to ejabberd directly

This script will help you to migrate a jabberd2 database stored in MySQL directly to ejabberd.

You can download a local copy of Daniel Willmann's jabberd2ejabberd.rb script.

Warning! This tool has not widely been tested! Use at your own risk

Things NOT covered with this script
* Privacy lists will not be migrated
* A couple tabels in jabberd2 don't have a counterpart in ejabberd like
  disco-items, motd-*, vacation-settings
* vcard extval fields are not supported

Things working:
* roster groups and items are being properly migrated
* vcard is partially being converted (Only some fields for now)
* The queue and private storage items are being migrated (stripping
  them from the route and iq stanzas)

Related Links

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Bug?

I don't know ruby and when I start script something is wrong:

XXX ~ # ./jabberd2ejabberd.rb --user XXX --password XXX --jabberd2db XXX --vhost XXX.XXX
Found Table private
Found Table authreg
Found Table roster-items
Found Table roster-groups
Found Table status
Found Table queue
Found Table vcard
Converting table private
Converting table authreg
Converting table roster-items
Converting table roster-groups
Converting table status
Converting table queue
Converting table vcard
/usr/lib/ruby/1.9.1/rexml/text.rb:117:in `gsub!': invalid byte sequence in US-ASCII (ArgumentError)
        from /usr/lib/ruby/1.9.1/rexml/text.rb:117:in `initialize'
        from /usr/lib/ruby/1.9.1/rexml/element.rb:494:in `new'
        from /usr/lib/ruby/1.9.1/rexml/element.rb:494:in `text='
        from ./jabberd2ejabberd.rb:226:in `block in vcard'
        from ./jabberd2ejabberd.rb:213:in `each'
        from ./jabberd2ejabberd.rb:213:in `vcard'
        from ./jabberd2ejabberd.rb:461:in `block in <main>'
        from ./jabberd2ejabberd.rb:459:in `each'
        from ./jabberd2ejabberd.rb:459:in `<main>'

Wrong encoding?

kiblik wrote:

...
/usr/lib/ruby/1.9.1/rexml/text.rb:117:in `gsub!': invalid byte sequence in US-ASCII (ArgumentError)
...

Wrong encoding/locals?!

Terminal:
echo $LANG - $LANGUAGE - $LC_ALL
What did it say?

Wrong

Wrong encoding/locals?!

Terminal:
echo $LANG - $LANGUAGE - $LC_ALL
What did it say?

Syndicate content