Back Up and Restore Messages

Applies To: Windows Server 2008

Use this procedure to backup and restore Message Queuing messages.

You can use this procedure to backup and restore Message Queuing messages. You can use the message backup and restore command-line utility, Mqbkup, provided with Message Queuing to protect message storage files, log files, transaction log files, and registry settings against computer failure. You must first create a folder to use for backup before using the utility.

Membership in the local Users group, or equivalent, is the minimum required to complete this procedure.

To backup and restore Message Queuing messages using a command line

  • At a command prompt, type the following, and then press ENTER:

    mqbkup {-bfolderpath | -rfolderpath| -?} [-y] [-cmsmq_resource_name]

Value Description

-bfolderpath

backs up the files to the specified folder

-rfolderpath

restores the files from the specified folder

-y

don't prompt (yes to all questions)

-cmsmq_resource_name

used when MSMQ is configured as a clustered resource, specify the clustered MSMQ resource name

-?

displays help for the utility

Formatting legend

Format Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

Before restoring messages, you must close Control Panel and all Message Queuing applications or any application that holds open a registry key handle to the HKLM\Software\MSMQ\Parameters registry key. Such applications typically include the Computer Management console if the Message Queuing snap-in is loaded, the MSMQ trigger service, the Message Queuing service, and some third party applications.

Note

Closing the control panel is not an issue on Windows XP and above because these versions of Windows do not include an MSMQ control panel extension.

Additional considerations

  • The Mqbkup utility cannot be used to backup or restore objects stored in Active Directory Domain Services. Therefore, the Mqbkup utility cannot backup or restore public queues since public queues are objects in Active Directory Domain Services. The Mqbkup utility does backup or restore any Message Queuing messages stored on the local computer that are referenced by public queues but the public queues themselves must be backed up or restored independently of the Mqbkup utility.

  • Before you run mqbkup, run wbadmin to backup any public queue information.

  • This utility backs up recoverable and transactional messages; including those in the outgoing queues. It does not back up or restore express messages.

  • Certificate and cryptographic key information is not backed up using this utility.

  • After a restore operation, you must register a new user certificate. For information about how to register a certificate, see Additional references.

  • This utility stops and restarts the Message Queuing service, which will cause any express messages to be lost. For more information about express messages, see Additional references.

  • If a COM+ application has been invoked by a rule that is bound to a trigger, then restoring of messages may fail with an "access is denied" error. To resolve this issue, follow these steps:

    1. On Windows Vista® computers, start mqbkup from a command prompt that is running with local Administrator privileges.

    2. Ensure that all user applications and services that are using the MSMQ API's are stopped.

    3. If restoring of messages still fails, wait for 10 minutes and try again. COM+ applications can take up to 10 minutes to unload from memory after all objects are released.

Additional references