[rabbitmq-discuss] Queue replication (I know, I know)

Derek Chen-Becker dbecker at cpicorp.com
Wed Oct 20 05:14:06 BST 2010

So, I've been doing some testing today with backing up the data store
for a broker to another machine and so far things have been working. If
I shut down the broker, copy the /var/lib/rabbitmq directory from the
server to a backup host, then start a new broker on the backup host,
durable queues/exchanges show up, persistent messages are exactly as
they were on the primary host, etc. I would be rather surprised if this
didn't work, but I wanted to throw this out there as a data point.

What's more interesting is that if I copy the /var/lib/rabbitmq
directory to the backup host *without stopping the primary broker*, and
then stop the primary and start the backup, everything still appears to
work fine. Now, I suspect that with the low volume I'm pushing here I'm
just getting lucky and not copying files in an inconsistent state, but
it made me think of possibly another approach to making backups: would
it be possible to implement a "pause/snapshot" for the broker such that
it would flush data, hold off on writes, etc. so that I could copy the
data in a consistent state. I could then issue a "resume" and all of the
clients would just continue on their merry way. At least this way the
sockets and socket bindings would stay open so that as far as clients
are concerned my broker is just being reaaaaallly slow.



More information about the rabbitmq-discuss mailing list