rabbitmq server Mnesia backup and restore

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

rabbitmq server Mnesia backup and restore

3k4b251
how to  backup and  restore   messages  queues  exchanges  on  node?
Reply | Threaded
Open this post in threaded view
|

Re: rabbitmq server Mnesia backup and restore

Emile Joubert

Hi,


On 06/08/13 09:46, 3k4b251 wrote:
> how to  backup and  restore   messages  queues  exchanges  on  node?


If you  just want to  backup the  broker config  then  do that by
saving  and loading  the definitions  using the  management plugin:
http://www.rabbitmq.com/management.html#load-definitions



If you  want to backup the messages as  well  then you should  stop  the
broker and  save the Mnesia  database directory.  Only durable
resources can  be backed up this way,  and only  persistent messages
will survive  when you restore.  Bear in mind  the  impact  on message
TTL  when  messages spend  time  backed up.





-Emile




_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: rabbitmq server Mnesia backup and restore

3k4b251
thanks.   but  how  to restore ?  just copy back?
Reply | Threaded
Open this post in threaded view
|

Re: rabbitmq server Mnesia backup and restore

Brett Cameron

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 [hidden email], 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 <[hidden email]> 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
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: rabbitmq server Mnesia backup and restore

David Tinker
In reply to this post by 3k4b251
QDB can backup/restore your queues in realtime to a remote server:

http://qdb.io/

QDB provides disk based messages queues and integrates with RabbitMQ.


On Wed, Aug 7, 2013 at 4:47 AM, 3k4b251 <[hidden email]> 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
> [hidden email]
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



--
http://qdb.io/ Persistent Message Queues With Replay and #RabbitMQ Integration
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss