ring0 » blog

migrating jabberd2 to ejabberd

tags: ring0, services 2010-04-27 08:30 by lhw

After being constantly pelted to change our Jabber/XMPP services from jabberd2 to ejabberd. We took a few hours of time and gone through with it once and for all.

“Thats gonna be easy”, was our first thought on it, “There are merge tools and such”. After testing the tools and running into problems with each of them(not merging at all, producing garbage output), we simply converted the information presented in the jabberd2 database to a ejabberd compatible format. Here is the sql we used to convert our database format: git.ring0.de

Okay the next problem was way worse then the first one. jabberd2 uses UNIX crypt() with salt for saving the passwords where as ejabberd uses plain text passwords by standard, hashes with hacking. As we are not really good with an old language like erlang we hacked ourselves something together. Mainly relying on the features (My)SQL provides us with. And here is the patch against ejabberd 2.1.2: git.ring0.de

Of course this version of the patch requires you to use MySQL with ejabberd therefore relying on the module from ejabberd.im But from this point on it’s easy to patch yourself some SQL together for other servers as well.