On Thu, Dec 24, 2009 at 7:04 AM, Badlop <span dir="ltr"><<a href="mailto:badlop@gmail.com">badlop@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2009/12/23 Jan Koum <<a href="mailto:jan.koum@gmail.com">jan.koum@gmail.com</a>>:<br>
<div><div></div><div class="h5">> we don't want to run 'ejabberdctl backup' on a live and heavily loaded<br>
> ejabberd server. so we want to do 'ejabberdctl stop' first -- however, after<br>
> we stop the node, we obviously can't run 'ejabberdctl backup' against it.<br>
> is there a simple solution/workaround to this dilema?<br>
<br>
</div></div>What about not allowing XMPP connections to ejabberd during backup?<br></blockquote><div><br><br>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:)<br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
There are at least four ways to backup ejabberd's Mnesia database.<br>
Sorted from more efficient to less efficient:<br>
<br>
1. tar -czvf backup-2009-12-23-19-44.tgz /var/lib/ejabberd<br></blockquote><div><br><br>but this tar command should only be done when mnesia and ejabberd are stopped, correct?<br><br>i wish there was something similar to mysqldump for mnesia:)<br>
<br>-- yan<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2. ejabberdctl backup file<br>
3. ejabberdctl dump file<br>
4. ejabberdctl export_piefxis dir<br>
<br>
For example, at 6AM every day:<br>
monday-saturday: method 1.<br>
sunday: method 2.<br>
<br>
On sunday, to apply 2 with your additional constrain, you can do this:<br>
5AM: stop the 5222 c2s listener port, so not more connections will be granted.<br>
6AM: send announcement that the server will be stopped<br>
605AM: restart ejabberd with all ports closed, backup using method 2,<br>
restart ejabberd with all ports opened.<br>
<br>
Maybe all this can be automated using cron, a shell script and ejabberdctl.<br>
<br>
<br>
<br>
---<br>
<font color="#888888">Badlop<br>
ProcessOne<br>
_______________________________________________<br>
ejabberd mailing list<br>
<a href="mailto:ejabberd@jabber.ru">ejabberd@jabber.ru</a><br>
<a href="http://lists.jabber.ru/mailman/listinfo/ejabberd" target="_blank">http://lists.jabber.ru/mailman/listinfo/ejabberd</a><br>
</font></blockquote></div><br>