On 21 January 2016 at 21:29:33, Tim Dunphy (
bluet...@gmail.com) wrote:
> How can I back up rabbitmq from the command line so that we can
> put the backup command into a cron job?
There is no separate backup command. You can copy the database directory.
Keep in mind that some messages that are persistent and routed to durable
queues can be in flight so this wouldn't give you an exact point-in-time snapshot
but as an ongoing backup strategy it can be good enough for some.
Or you could keep a hot standby node/cluster where everything is replicated
(using exchange federation and imported/exported topology from the live node/cluster).
Because replication doesn't account for messages consumed in the origin, it is a good idea
to set a TTL for messages globally in the standby cluster, say to N hours.
When you have to switch, remove the policy that defined TTL and it won't be applied to newly
published messages.
--
MK
Staff Software Engineer, Pivotal/RabbitMQ