将 Windows 系统状态备份到 AzureBack up Windows system state to Azure

本文介绍了如何将 Windows Server 系统状态备份到 Azure。This article explains how to back up your Windows Server system state to Azure. 它旨在引导完成基本操作。It's intended to walk you through the basics.

如果想要深入了解 Azure 备份,请阅读此 概述If you want to know more about Azure Backup, read this overview.

如果没有 Azure 订阅,可以先创建一个 试用帐户 ,这样就可以访问任何 Azure 服务。If you don't have an Azure subscription, create a Trial that lets you access any Azure service.

创建恢复服务保管库Create a Recovery Services vault

恢复服务保管库是用于存储在不同时间创建的备份和恢复点的实体。A Recovery Services vault is an entity that stores the backups and recovery points created over time. 恢复服务保管库还包含与受保护虚拟机关联的备份策略。The Recovery Services vault also contains the backup policies that are associated with the protected virtual machines.

若要创建恢复服务保管库,请执行以下操作:To create a Recovery Services vault:

  1. Azure 门户中登录到自己的订阅。Sign in to your subscription in the Azure portal.

  2. 在左侧菜单中,选择“所有服务”。On the left menu, select All services.


  3. 在“所有服务”对话框中,输入“恢复服务”。In the All services dialog box, enter Recovery Services. 资源列表根据输入进行筛选。The list of resources filters according to your input. 在资源列表中,选择“恢复服务保管库”。In the list of resources, select Recovery Services vaults.


    此时会显示订阅中的恢复服务保管库列表。The list of Recovery Services vaults in the subscription appears.

  4. 在“恢复服务保管库”仪表板上,选择“添加”。On the Recovery Services vaults dashboard, select Add.


    此时会打开“恢复服务保管库”对话框。The Recovery Services vault dialog box opens. 提供“名称”、“订阅”、“资源组”和“位置”的值。Provide values for the Name, Subscription, Resource group, and Location.


    • 名称:输入一个友好名称以标识此保管库。Name: Enter a friendly name to identify the vault. 名称对于 Azure 订阅必须是唯一的。The name must be unique to the Azure subscription. 指定的名称应至少包含 2 个字符,最多不超过 50 个字符。Specify a name that has at least two, but not more than 50 characters. 名称必须以字母开头且只能包含字母、数字和连字符。The name must start with a letter and consist only of letters, numbers, and hyphens.

    • 订阅:选择要使用的订阅。Subscription: Choose the subscription to use. 如果你仅是一个订阅的成员,则会看到该名称。If you're a member of only one subscription, you'll see that name. 如果不确定要使用哪个订阅,请使用默认的(建议的)订阅。If you're not sure which subscription to use, use the default (suggested) subscription. 仅当工作或学校帐户与多个 Azure 订阅关联时,才会显示多个选项。There are multiple choices only if your work or school account is associated with more than one Azure subscription.

    • 资源组:使用现有资源组或创建新组。Resource group: Use an existing resource group or create a new one. 要查看订阅中可用的资源组列表,请选择“使用现有资源”,然后从下拉列表框中选择一个资源。To see the list of available resource groups in your subscription, select Use existing, and then select a resource from the drop-down list box. 若要创建新资源组,请选择“新建”,然后输入名称。To create a new resource group, select Create new and enter the name. 有关资源组的完整信息,请参阅 Azure 资源管理器概述For complete information about resource groups, see Azure Resource Manager overview.

    • 位置:选择保管库的地理区域。Location: Select the geographic region for the vault. 要创建保管库以保护虚拟机,保管库必须与虚拟机位于同一区域中。To create a vault to protect virtual machines, the vault must be in the same region as the virtual machines.


      如果不确定 VM 的位置,请关闭对话框。If you're not sure of the location of your VM, close the dialog box. 转到门户中的虚拟机列表。Go to the list of virtual machines in the portal. 如果虚拟机位于多个区域,请在每个区域中创建一个恢复服务保管库。If you have virtual machines in several regions, create a Recovery Services vault in each region. 先在第一个位置创建保管库,然后再为其他位置创建保管库。Create the vault in the first location, before you create the vault for another location. 无需指定存储帐户即可存储备份数据。There's no need to specify storage accounts to store the backup data. 恢复服务保管库和 Azure 备份服务会自动处理这种情况。The Recovery Services vault and the Azure Backup service handle that automatically.

  5. 准备好创建恢复服务保管库后,选择“创建”。When you're ready to create the Recovery Services vault, select Create.


    创建恢复服务保管库可能需要一段时间。It can take a while to create the Recovery Services vault. 可在门户右上角“通知”区域监视状态通知。Monitor the status notifications in the Notifications area at the upper-right corner of the portal. 创建保管库后,它会显示在“恢复服务保管库”的列表中。After your vault is created, it's visible in the list of Recovery Services vaults. 如果未看到创建的保管库,请选择“刷新”。If you don't see your vault, select Refresh.


为保管库设置存储冗余Set storage redundancy for the vault

在创建恢复服务保管库时,请确保存储冗余配置为所希望的方式。When you create a Recovery Services vault, make sure storage redundancy is configured the way you want.

  1. 从“恢复服务保管库”边栏选项卡中,单击新保管库 。From the Recovery Services vaults blade, click the new vault. 在“设置”部分下,单击“属性” 。Under the Settings section, click Properties.

  2. 在“属性”中,在“备份配置”下,单击“更新”。 In Properties, under Backup Configuration, click Update.

  3. 选择存储复制类型,然后单击“保存”。Select the storage replication type, and click Save.


    • 如果使用 Azure 作为主要备份存储终结点,则我们建议继续使用默认的“异地冗余”设置。We recommend that if you're using Azure as a primary backup storage endpoint, continue to use the default Geo-redundant setting.
    • 如果不使用 Azure 作为主要的备份存储终结点,则请选择“本地冗余”,减少 Azure 存储费用。If you don't use Azure as a primary backup storage endpoint, then choose Locally redundant, which reduces the Azure storage costs.
    • 详细了解异地冗余本地冗余Learn more about geo and local redundancy.


在保管库中配置备份之前,必须更改恢复服务保管库的存储复制类型(本地冗余/异地冗余)。Changing Storage Replication type (Locally redundant/ Geo-redundant) for a Recovery services vault has to be done before configuring backups in the vault. 配置备份后,将禁用修改选项。Once you configure backup, the option to modify is disabled.

  • 如果尚未配置备份,请遵循这些步骤检查和修改设置。If you haven't yet configured the backup, then follow these steps to review and modify the settings.
  • 如果已配置备份,并且必须从 GRS 迁移到 LRS,请查看解决方法If you've already configured the backup and must move from GRS to LRS, then review these workarounds.

创建保管库之后,即可对其进行配置,以便备份 Windows 系统状态。Now that you've created a vault, configure it for backing up Windows System State.

配置保管库Configure the vault

  1. 在“恢复服务保管库”窗格(对应于刚创建的保管库)的“开始”部分,选择“备份”。On the Recovery Services vault pane (for the vault you just created), in the Getting Started section, select Backup.

    此时将打开“备份”窗格。The Backup pane opens.


  2. 从“工作负荷的运行位置?”下拉菜单中选择“本地” 。From the Where is your workload running? drop-down menu, select On-premises.

    之所以选择“本地”,是因为 Windows Server 或 Windows 计算机是不在 Azure 中的物理计算机。You choose On-premises because your Windows Server or Windows computer is a physical machine that isn't in Azure.

  3. 从“要备份哪些内容?”菜单中选择“系统状态”。 From the What do you want to back up? menu, select System State.


    选择“系统状态”后,将打开“准备基础结构”窗格 。After selecting System State, the Prepare infrastructure pane opens.


  4. 在“准备基础结构”窗格上,选择“下载适用于 Windows Server 或 Windows 客户端的代理” 。On the Prepare infrastructure pane, select Download Agent for Windows Server or Windows Client.


    如果使用的是 Windows Server Essential,则选择下载适用于 Windows Server Essential 的代理。If you're using Windows Server Essential, then choose to download the agent for Windows Server Essential. 弹出菜单会提示用户运行或保存 MARSAgentInstaller.exe。A pop-up menu prompts you to run or save MARSAgentInstaller.exe.

    MARSAgentInstaller 对话框

  5. 在下载弹出窗口中选择“保存”。In the download pop-up menu, select Save.

    默认情况下,MARSagentinstaller.exe 文件将保存到 Downloads 文件夹。By default, the MARSagentinstaller.exe file is saved to your Downloads folder. 下载完安装程序以后,会显示一个弹出窗口,询问用户是要运行安装程序,还是要打开文件夹。When the installer completes, you'll see a pop-up asking if you want to run the installer, or open the folder.

    MARS 安装程序已完成

    此时还不需要安装代理。You don't need to install the agent yet. 下载保管库凭据之后,即可安装代理。You can install the agent after you've downloaded the vault credentials.

  6. 在“准备基础结构”窗格上,选择“下载” 。On the Prepare infrastructure pane, select Download.


    保管库凭据下载到“下载”文件夹。The vault credentials download to your Downloads folder. 下载完保管库凭据以后,会显示一个弹出窗口,询问用户是要打开还是要保存凭据。After the vault credentials finish downloading, you'll see a pop-up asking if you want to open or save the credentials. 选择“保存”。 Select Save. 如果意外选择了“打开”,可以让尝试打开保管库凭据的对话框关闭。If you accidentally select Open, let the dialog that attempts to open the vault credentials, fail. 你将无法打开保管库凭据。You won't be able to open the vault credentials. 继续执行下一步。Continue to the next step. 保管库凭据位于“下载”文件夹中。The vault credentials are in the Downloads folder.



    保管库凭据只能保存到打算使用代理的 Windows Server 的本地位置。The vault credentials must be saved only to a location that's local to the Windows Server on which you intend to use the agent.

升级 MARS 代理Upgrade the MARS agent

低于 2.0.9083.0 的 Azure 恢复服务 (MARS) 代理版本依赖于 Azure 访问控制服务 (ACS)。Versions of the Azure Recovery Service (MARS) agent below 2.0.9083.0 have a dependency on the Azure Access Control service (ACS). MARS 代理也称为 Azure 备份代理。The MARS agent is also referred to as the Azure Backup agent. 在 2018 年,Azure deprecated the Azure Access Control service (ACS)In 2018, Azure deprecated the Azure Access Control service (ACS). 从 2018 年 3 月 19 日开始,低于 2.0.9083.0 的所有 MARS 代理版本会遇到备份失败。Beginning March 19, 2018, all versions of the MARS agent below 2.0.9083.0 will experience backup failures. 若要避免或解决备份失败,请将 MARS 代理升级到最新版本To avoid or resolve backup failures, upgrade your MARS agent to the latest version. 若要确定需要 MARS 代理升级的服务器,请按照用于升级 MARS 代理的备份博客中的步骤操作。To identify servers that require a MARS agent upgrade, follow the steps in the Backup blog for upgrading MARS agents. MARS 代理用于将文件、文件夹和系统状态数据备份到 Azure。The MARS agent is used to back up files and folders, and system state data to Azure. System Center DPM 和 Azure 备份服务器使用 MARS 代理将数据备份到 Azure。System Center DPM and Azure Backup Server use the MARS agent to back up data to Azure.

安装并注册代理Install and register the agent


无法通过 Azure 门户启用备份功能。Enabling backup through the Azure portal isn't available. 使用 Azure 恢复服务代理备份 Windows Server 的系统状态。Use the Azure Recovery Services Agent to back up Windows Server System State.

  1. 在 Downloads 文件夹(或其他保存位置)中找到并双击 MARSagentinstaller.exeLocate and double-click the MARSagentinstaller.exe from the Downloads folder (or other saved location).

    安装程序会在提取、安装和注册恢复服务代理时提供一系列消息。The installer provides a series of messages as it extracts, installs, and registers the Recovery Services agent.


  2. 完成 Azure 恢复服务代理安装向导。Complete the Azure Recovery Services Agent Setup Wizard. 若要完成该向导,需完成以下操作:To complete the wizard, you need to:

    • 选择安装和缓存文件夹的位置。Choose a location for the installation and cache folder.

    • 如果使用代理服务器来连接 Internet,请提供代理服务器信息。Provide your proxy server info if you use a proxy server to connect to the internet.

    • 如果使用经过身份验证的代理,请提供用户名和密码详细信息。Provide your user name and password details if you use an authenticated proxy.

    • 提供已下载的保管库凭据Provide the downloaded vault credentials

    • 将加密通行短语保存在安全的位置。Save the encryption passphrase in a secure location.


      如果丢失或忘记了通行短语,Azure 无法帮助你恢复备份数据。If you lose or forget the passphrase, Azure can't help recover the backup data. 请将文件保存在安全的位置。Save the file in a secure location. 还原备份时需要用到此文件。It's required to restore a backup.

现已安装代理,且已向保管库注册计算机。The agent is now installed and your machine is registered to the vault. 接下来可以配置和计划备份。You're ready to configure and schedule your backup.

备份 Windows Server 系统状态Back up Windows Server System State

初始备份包括两个任务:The initial backup includes two tasks:

  • 计划备份Schedule the backup
  • 首次备份系统状态Back up System State for the first time

若要完成初始备份,请使用 Azure 恢复服务代理。To complete the initial backup, use the Azure Recovery Services agent.


可以在 Windows Server 2008 R2 到 Windows Server 2016 上备份系统状态。You can back up System State on Windows Server 2008 R2 through Windows Server 2016. 客户端 SKU 不支持系统状态备份。System State back up isn't supported on client SKUs. 系统状态不会显示为 Windows 客户端或 Windows Server 2008 SP2 计算机选项。System State isn't shown as an option for Windows clients, or Windows Server 2008 SP2 machines.

计划备份作业To schedule the backup job

  1. 打开 Azure 恢复服务代理。Open the Azure Recovery Services agent. 可以通过在计算机中搜索“Azure 备份”找到该代理。You can find it by searching your machine for Azure Backup.

    启动 Azure 恢复服务代理

  2. 在恢复服务代理中,选择“计划备份”。In the Recovery Services agent, select Schedule Backup.

    计划 Windows Server 备份

  3. 在计划备份向导的“开始使用”页上,选择“下一步” 。On the Getting started page of the Schedule Backup Wizard, select Next.

  4. 在“选择要备份的项”页上,选择“添加项” 。On the Select Items to Backup page, select Add Items.

  5. 选择“系统状态”,并选择“确定” 。Select System State and then select OK.

  6. 选择“下一页”。Select Next.

  7. 在后续页中选择系统状态备份所需的备份频率和保留策略。Select the required Backup frequency and the retention policy for your System State backups in the subsequent pages.

  8. 在“确认”页上复查信息,然后选择“完成”。On the Confirmation page, review the information, and then select Finish.

  9. 在向导完成创建备份计划后,选择“关闭”。After the wizard finishes creating the backup schedule, select Close.

首次备份 Windows Server 系统状态To back up Windows Server System State for the first time

  1. 请确保需要重启的 Windows Server 没有挂起的更新。Make sure there are no pending updates for Windows Server that require a reboot.

  2. 在恢复服务代理中选择“立即备份”,以通过网络完成初始种子设定。In the Recovery Services agent, select Back Up Now to complete the initial seeding over the network.

    立即备份 Windows Server

  3. 在出现的“选择备份项”屏幕上选择“系统状态”,然后选择“下一步” 。Select System State on the Select Backup Item screen that appears and select Next.

  4. 在“确认”页上复查“立即备份向导”用于备份计算机的设置。On the Confirmation page, review the settings that the Back Up Now Wizard will use to back up the machine. 然后选择“备份”。Then select Back Up.

  5. 选择“关闭”以关闭向导。Select Close to close the wizard. 如果在备份过程完成之前关闭向导,向导将继续在后台运行。If you close the wizard before the backup process finishes, the wizard continues to run in the background.


    在每次系统状态备份之前,MARS 代理都会在预检查过程中触发 SFC /verifyonlyThe MARS Agent triggers SFC /verifyonly as part of the prechecks before every system state backup. 这是为了确保作为系统状态一部分备份的文件具有与 Windows 版本相对应的正确版本。This is to ensure that files backed up as part of System State have the correct versions corresponding to the Windows version. 本文中详细了解系统文件检查器 (SFC)。Learn more about System File Checker (SFC) in this article.

完成初始备份后,备份控制台中显示“作业已完成”状态。After the initial backup is completed, the Job completed status appears in the Backup console.

IR 完成

后续步骤Next steps