In this blogpost i will show you how to backup and restore your active RabbitMQ configuration.
This is only the configuration no definitions or messages will be backed-up or restored.
To be able to backup or restore a RabbitMQ configuration you will need to get command line tool rabbitmqadmin.
First check if rabbitmq_managment is enabled on one of your RabbitMQ nodes:
rabbitmq-plugins enable rabbitmq_management
After that you will be able to download rabbitmqadmin on the RabbitMQ node with the following command:
Once downloaded, make the file executable and move it to the
/usr/local/bin directory on the RabbitMQ node:
chmod +x rabbitmqadmin sudo mv rabbitmqadmin /usr/local/bin
To backup the RabbitMQ instance configuration, use the following command:
rabbitmqadmin export <configuration-backup-file-name.json>
Exported definitions for localhost to "configuration-backup-test.json"
To restore the RabbitMQ instance configuration, user the following command:
rabbitmqadmin import <configuration-backup-file-name.json>
Imported definitions for localhost from "configuration-backup-test.json"