To access the most up-to-date ejabberd documentation, please visit docs.ejabberd.im »
Migrate from Openfire to ejabberd ODBC
Submitted by mfoss on Tue, 2007-10-23 17:52
This tutorial will help you to migrate an Openfire database to ejabberd ODBC storage.
Original conversion script written by: Pedro Melo. Published in the ejabberd mailing list in 21st September, 2007.
Please note that this script was developed for the author's requirements. The author of the script migrated his own server with it and it worked fine, as fair as he could can tell.
Install the Import/Export Plugin via the Openfire Webinterface.
Export your database to a file named like your realm. So for a jabber server named jabber.example.org the file name should be "jabber.example.org.xml".
# Scan for users
-foreach my $user ($xp->findnodes('/Wildfire/User')) {
+foreach my $user ($xp->findnodes('/Openfire/User')) {
# fetch login and password
my $login = $xp->findvalue('Username', $user);
my $passw = $xp->findvalue('Password', $user);
ruby version openfire2ejabberd
i scripted another version of a migrate script in ruby for fun:
http://svn.orgizm.net/collective/browser/tools/openfire2ejabberd?format=txt
---
--- x-convert-wildfire-to-ejabberd.orig 2007-09-21 17:17:26.000000000 +0400
+++ x-convert-wildfire-to-ejabberd 2009-07-10 10:56:38.000000000 +0400
@@ -78,7 +78,7 @@
my $xp = XML::LibXML::XPathContext->new($doc);
# Scan for users
-foreach my $user ($xp->findnodes('/Wildfire/User')) {
+foreach my $user ($xp->findnodes('/Openfire/User')) {
# fetch login and password
my $login = $xp->findvalue('Username', $user);
my $passw = $xp->findvalue('Password', $user);
Thanks. I've updated the
Thanks. I've updated the script with that change.