大网数据广告活动
Windows排障命令

mqbkup

· 52CE 我爱测

Reference article for the mqbkup command, which backs up MSMQ message files and registry settings to a storage device and restores previously-stored messages and settings.

Backs up MSMQ message files and registry settings to a storage device and restores previously-stored messages and settings.

Both the backup and the restore operations stop the local MSMQ service. If the MSMQ service was started beforehand, the utility will attempt to restart the MSMQ service at the end of the backup or the restore operation. If the service was already stopped before running the utility, no attempt to restart the service is made.

Before using the MSMQ Message Backup/Restore utility you must close all local applications that are using MSMQ.

Syntax

mqbkup {/b | /r} <folder path_to_storage_device>

Parameters

Parameter Description
/b Specifies backup operation.
/r Specifies restore operation.
<folder path_to_storage_device> Specifies the path where the MSMQ message files and registry settings are stored.
/? Displays help at the command prompt.
Remarks
  • If a specified folder doesn't exist while performing either the backup or restore operation, the folder is automatically created by the utility.

  • If you choose to specify an existing folder, it must be empty. If you specify a non-empty folder, the utility deletes every file and subfolder contained within it. In this case, you'll be prompted to give permission to delete existing files and subfolders. You can use the /y parameter to indicate that you agree beforehand to the deletion of all existing files and subfolders in the specified folder.

  • The locations of folders used to store MSMQ message files are stored in the registry. Therefore, the utility restores MSMQ message files to the folders specified in the registry and not to the storage folders used before the restore operation.

Examples

To backup all MSMQ message files and registry settings, and to store them in the msmqbkup folder on your C: drive, type:

mqbkup /b c:\msmqbkup

To delete all existing files and subfolders in the oldbkup folder on your C: drive, and then to store MSMQ message files and registry settings in the folder, type:

mqbkup /b /y c:\oldbkup

To restore MSMQ messages and registry settings, type:

mqbkup /r c:\msmqbkup

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 10/16/2017
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。