[rabbitmq-discuss] How to create a rabbitmq cluster using existing application without losing existing data?
Joshua Lim
joshua__lim at hotmail.com
Wed Dec 11 10:26:07 GMT 2013
Hi,
I'm trying to find out if it is possible to create a rabbitmq cluster for an existing production instance with data on it. The reason is because I'm starting with only 1 server for the start and would like to expand to a 2 server cluster only in the future. I'm currently using RabbitMQ 3.2.1 on Erlang R16B02 on Windows 7.
What I did is:
1. Issue rabbitmqctl stop_app, rabbitmqctl reset, rabbitmqctl stop on both nodes.2. Add auto-config to rabbitmq.config on both nodes: {cluster_nodes, {['rabbit at existing-machine', 'rabbit at new-machine'], disc}}3. Start rabbitmq service on rabbit at new-machine followed by rabbit at existing-machine
After that, the cluster is successfully created, however, all existing data, e.g. virtual hosts, users, etc, is erased from the 2 nodes.
cluster_status result from new-machine:
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.2.1\sbin>rabbitmqctl cluster_statusCluster status of node rabbit at new-machine ...[{nodes,[{disc,[rabbit at new-machine,rabbit at existing-machine]}]}, {running_nodes,[rabbit at existing-machine,rabbit at new-machine]}, {partitions,[]}]...done.
Rgds,Joshua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131211/8716e401/attachment.html>
More information about the rabbitmq-discuss
mailing list