[jadmin] Migration from jabberd2 to jabberd14
David Ammouial
da-jadmin at weeno.net
Fri Mar 9 07:33:18 CST 2007
Hi!
On Thursday 08 March 2007 22:20, Manuel Herzog wrote:
> I tried to migrate from jabberd2 to jabberd14 1.6.0. So it looks like
> ugly work to transfer the data from the "roster-item" and the
> "roster-groups" table of jabberd2 to the single "xml"-field in the roster
> table of jabberd14.
> Do you know if there are existing migration scripts or easier ways with
> using
> the old spool format?
jabberd14 uses a very customizable configuration to specify the SQL request
that if performed on various types of requests (e.g. get/set roster). So
you can probably use your tables as is, and modify the SQL request that is
performed for the jabber:iq:roster namespace in jabberd14's jabber.xml.
The request can forge the XML on the fly using the information in your
tables. I don't know how jabberd2 stores its roster info, but the MySQL
functions CONCAT (to forge each <item/> entry) and GROUP_CONCAT (to glue
the <item/>s together) might be useful to you (if you're using MySQL, that
is).
Another idea is to do this "conversion" once using an UPDATE request. I
don't know of any existing tool, but if you know some basic SQL it should
be ok.
In either approach, if you use GROUP_CONCAT() to generate the rosters, don't
forget to increase the value of the group_concat_max_len (default is 1024,
for a roster it's not enough), either in mysqld configuration or at runtime
in jabber.xml, e.g.:
<onconnect>SET group_concat_max_len = 1048576</onconnect>
Regards.
--
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.jabber.org/pipermail/jadmin/attachments/20070309/1ed0fc65/attachment.pgp
More information about the JAdmin
mailing list