Add new user user
with password password
and set all permissions with admin access for management plugin:
rabbitmqctl add_user user password
rabbitmqctl set_permissions user ".*" ".*" ".*"
rabbitmqctl set_user_tags user administrator
First, backup and restore definitions:
curl -u user:password -X GET http://server_src:15672/api/definitions > def.json
rabbitmqctl import_definitions def.json
Then copy messages from source to target server into message directory. Needs to copy dirs msg_store_persistent/
, msg_store_transient
, queues
and recovery.dets
file.
Data direcory (base) on Ubuntu: /var/lib/rabbitmq/mnesia/rabbit@cluster_name/
For RabbitMQ 3.6 messages stores at base dir.
For RabbitMQ 3.9 messages stores at base dir into msg_stores/vhosts/HASH/
.