Problem

I am currently running vFabric RabbitMQ 2.8.6 that was installed using the generic installer vfabric-rabbitmq-server-2.8.6.tar.gz in a customized directory /apps/appuser/springsource/vfabric-rabbitmq-server-2.8.6/

** Although I am using vFabric RabbitMQ, but the same is applicable on the native RabbitMQ
Analysis
The default RPM installer will use the standard path /var/lib/rabbitmq/mnesia/ to store mnesia database that contains the queues and exchanges definitions, also the persistent messages are located under the same directory /var/lib/rabbitmq/mnesia/rabbit\@<hostname>/
The generic installer vfabric-rabbitmq-server-2.8.6.tar.gz stored mnesia database and persistent messages under a customized directory path /apps/appuser/springsource/vfabric-rabbitmq-server-2.8.6/var/lib/rabbitmq/mnesia.
As described in the RabbitMQ 3.0.4 Release Notes, to upgrade a non-clustered RabbitMQ 2.8.6 to 3.0.4, simply install the new version 3.0.4 and all configuration and persistent message data is retained but as per our standards the new 3.0.4 installation will be at /apps/appuser/springsource/vfabric-rabbitmq-server-3.0.4/ and it will not detect the old mnesia directory which mean none of the configuration or messages will be migrated to 3.0.4 installation.
Workaround
As a workaround, you can overcome this limitation by:
- Check the queues and messages from the RabbitMQ 2.8.6 console http://<hostname:55672>
- Shutdown RabbitMQ 2.8.6
- Backup the installation directory (/apps/appuser/springsource/vfabric-rabbitmq-server-2.8.6/)
- Install the RabbitMQ 3.0.4 to the new customized directory /apps/appuser/springsource/vfabric-rabbitmq-server-3.0.4/
- Make sure that RabbitMQ is not running
- Copy all files under the old mnesia directory from /apps/appuser/springsource/vfabric-rabbitmq-server-2.8.6/var/lib/rabbitmq/mnesia/rabbit@<hostname> to /apps/appuser/springsource/vfabric-rabbitmq-server-3.0.4/var/lib/rabbitmq/mnesia/rabbit@<hostname>
- Start RabbitMQ 3.0.4
- Check if the queues, exchanges and messages from the RabbitMQ 3.0.4 console http://<hostname:15672>
- Your queues, exchanges, and messages will be there :)
Limitaions
This workaround is only valid on the same host server, moving mnesia database is not supported between different hosts with different hostnames.