[ejabberd] backing up stopped node?
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,
> > 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
i wish there was something similar to mysqldump for mnesia:)
> 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
> 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.
> ejabberd mailing list
> ejabberd at jabber.ru
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ejabberd