[ejabberd] backing up stopped node?

Jan Koum jan.koum at gmail.com
Fri Dec 25 04:49:18 MSK 2009


On Thu, Dec 24, 2009 at 7:04 AM, Badlop <badlop at gmail.com> wrote:

> 2009/12/23 Jan Koum <jan.koum at gmail.com>:
> > we don't want to run 'ejabberdctl backup' on a live and heavily loaded
> > ejabberd server. so we want to do 'ejabberdctl stop' first -- however,
> after
> > we stop the node, we obviously can't run 'ejabberdctl backup' against it.
> > is there a simple solution/workaround to this dilema?
>
> What about not allowing XMPP connections to ejabberd during backup?
>


heh, that is actually exactly what we ended up doing: edit ejabberd.cfg,
change port 5222 to 15222, restart ejabberd, wait 5 minutes for mnesia to
load, run backup, edit ejabberd.cfg again, restart ejabberd again, wait
another 5 minutes for mnesia to load:)



>
> There are at least four ways to backup ejabberd's Mnesia database.
> Sorted from more efficient to less efficient:
>
> 1. tar -czvf backup-2009-12-23-19-44.tgz /var/lib/ejabberd
>


but this tar command should only be done when mnesia and ejabberd are
stopped, correct?

i wish there was something similar to mysqldump for mnesia:)

-- yan



> 2. ejabberdctl backup file
> 3. ejabberdctl dump file
> 4. ejabberdctl export_piefxis dir
>
> For example, at 6AM every day:
> monday-saturday: method 1.
> sunday: method 2.
>
> On sunday, to apply 2 with your additional constrain, you can do this:
> 5AM: stop the 5222 c2s listener port, so not more connections will be
> granted.
> 6AM: send announcement that the server will be stopped
> 605AM: restart ejabberd with all ports closed, backup using method 2,
> restart ejabberd with all ports opened.
>
> Maybe all this can be automated using cron, a shell script and ejabberdctl.
>
>
>
> ---
> Badlop
> ProcessOne
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20091224/e1e57ba1/attachment.html>


More information about the ejabberd mailing list