[ejabberd] Looking for advices on migrating to the odbc version of some modules...

Felix GV felix at mate1inc.com
Sat Nov 10 03:50:06 MSK 2012

We ended up finding ejd2odbc and it looks like that's going to fulfill our
needs :)

Shouldn't the existence of this module be mentioned in the installation and
operation guide...?


On Tue, Nov 6, 2012 at 2:37 PM, Felix GV <felix at mate1inc.com> wrote:

> Hello,
> We deployed an ejabberd cluster a couple weeks ago, and the size of our
> roster and last_activity tables seem to have become problematic.
> We sometimes want to do rolling restarts on the cluster, and the nodes now
> take 5 minutes+ each to start. We think this is probably because of the
> size of Mnesia.
> I have tested a set up where an ejabberd cluster uses mod_last_odbc and
> mod_roster_odbc with the native MySQL driver, and that seems to work fine
> for new data, but I need to find a way to migrate the data that currently
> exists in Mnesia to MySQL.
> The documentation says we can't run both versions of a module.
> We were thinking of doing something along those lines:
>    - Disconnect all users (while keeping the nodes up)
>    - Using a custom erlang module to read the data from the last_activity
>    and roster Mnesia tables and write it to the corresponding MySQL tables.
>    - Changing the nodes' config so that it uses the odbc versions of the
>    modules.
>    - Restarting the nodes (or doing the module unloading and loading
>    live...)
>    - Once we're certain everything's fine: delete the old Mnesia data.
> We don't mind having a bit of downtime if that makes things simpler and
> more reliable, although we certainly are interested in doing this without
> downtime if there is a proven solution to do so.
> I haven't found an already-implemented way of doing such data migration,
> but if it exists, I'd like to know about it! Otherwise, we'll roll out our
> own implementation of the data migration module, in which case, any advice
> or best practices recommendation would be greatly appreciated!
> Thanks :)
> --
> Felix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20121109/71b2f0df/attachment.html>

More information about the ejabberd mailing list