Backup

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

MSMQ can be easily backed up programmatically.

To backup MSMQ
  • Stop MSMQ first by issuing the following command.

    msmqadm -f \temp\msmqadm.txt stop
    

    If MSMQ has successfully stopped, the output file will be empty. Back up the HKEY_LOCAL_MACHINE\Software\Microsoft\MSMQ registry key and the MSMQ storage directory in the BaseDir entry.

    On another device, you can restore the backup by installing MSMQ using the following command.

    msmqadm -f \temp\msmqadm.txt register install 
    

    Typically, you can register the MSMQ service using the command msmqadm register. Instead of using this registration step, you can restore the MSMQ registry key and contents of the MSMQ base directory and then reboot the device.

    Aa926213.note(en-us,MSDN.10).gifNote:
    Backup and restore perform poorly in the presence of transactional queues. Because tracking transactional messages is distributed, information vital to the consistency of the transactional queue is present on both source and destination machines. If one machine is restored to a previous state and the other is not, consistency is irrevocably lost. The only practical way to back up machines in the presence of transactional queues is to stop both source and destination and then perform the backup.

Community Additions

Show: