[rabbitmq-discuss] rabbitmq server Mnesia backup and restore

Brett Cameron brett.r.cameron at gmail.com
Wed Aug 7 04:52:20 BST 2013

You would need to backup everything under $RABBITMQ_MNESIA_DIR. This
includes both the Mnesia database (which as Emile says holds durable
configuration data) and the files used to store messages (and their
associated index files). At a quiet point (or preferably with the broker
shut down) you could hypothetically tar up the whole lot and then
subsequently restore if necessary; however it is important to note that the
Mnesia database is associated with a particular Erlang node (say
rabbit at mynode, where mynode is the name of the server on which the broker
is running), so you cannot simply copy your backup to another node, restore
it and expect things to work. There are ways to change the node name
associated with the database, but even then you may not be totally
successful. If you want to get a bit fancy you can also backup and restore
the Mnesia database using Erlang Mnesia functions like backup/1 and
restore/1. However, the simplest way to save your configuration is to use
the rabbitmqadmin tool, assuming you have the management API installed. For
example the command "rabbitmqadmin export broker.conf" will save your
configuration as a JSON document to the file broker.conf, and you could
subsequently restore it using the corresponding rabbitmqadmin import
command (you can also do these operations via the management web UI).
Instead of backing up the files used to store messages you might be better
off replicating the queues across to one or more cluster nodes.

On Wed, Aug 7, 2013 at 2:47 PM, 3k4b251 <314992959 at qq.com> wrote:

> thanks.   but  how  to restore ?  just copy back?
> --
> View this message in context:
> http://rabbitmq.1065348.n5.nabble.com/rabbitmq-server-Mnesia-backup-and-restore-tp28598p28622.html
> Sent from the RabbitMQ mailing list archive at Nabble.com.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130807/fd0403c9/attachment.htm>

More information about the rabbitmq-discuss mailing list