将 Windows Server 备份到 AzureBack up Windows Server to Azure

可使用 Azure 备份保护 Windows Server 免受损坏、攻击和灾难影响。You can use Azure Backup to protect your Windows Server from corruptions, attacks, and disasters. Azure 备份提供一个名为 Azure 恢复服务 (MARS) 代理的轻量工具。Azure Backup provides a lightweight tool known as the Azure Recovery Services (MARS) agent. MARS 代理安装在 Windows Server 上,用于通过 Windows Server 系统状态保护文件、文件夹和服务器配置信息。The MARS agent is installed on the Windows Server to protect files and folders, and server configuration info via Windows Server System State. 本教程介绍如何使用 MARS 代理将 Windows Server 备份到 Azure。This tutorial explains how you can use MARS Agent to back up your Windows Server to Azure. 本教程介绍如何执行下列操作:In this tutorial you learn how to:

  • 下载和设置 MARS 代理Download and set up the MARS Agent
  • 为服务器备份配置备份时间和保留计划Configure back up times and retention schedule for your server’s backups
  • 执行即席备份Perform an ad-hoc back up

登录 AzureSign in to Azure

通过 http://portal.azure.cn 登录到 Azure 门户。Sign in to the Azure portal at http://portal.azure.cn.

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

备份 Windows Server 前,必须创建一个存储备份或还原点的位置。Before you can back up Windows Server, you must create a place for the backups, or restore points, to be stored. 恢复服务保管库是 Azure 中存储来自 Windows Server 的备份的容器。A Recovery Services vault is a container in Azure that stores the backups from your Windows Server. 按照以下步骤在 Azure 门户中创建恢复服务保管库。Follow the steps below to create a Recovery Services vault in the Azure portal.

  1. 在左侧菜单上,选择“所有服务”,然后在服务列表中键入“恢复服务”。On the left-hand menu, select All services and in the services list, type Recovery Services. 单击“恢复服务保管库” 。Click Recovery Services vaults.

    打开恢复服务保管库

  2. 在“恢复服务保管库”菜单中,单击“添加”。On the Recovery Services vaults menu, click Add.

    提供保管库信息

  3. 在“恢复服务保管库”菜单中,In the Recovery Services vault menu,

    • 在“名称”中键入“myRecoveryServicesVault”。Type myRecoveryServicesVault in Name.
    • 当前订阅 ID 显示在“订阅”中。The current subscription ID appears in Subscription.
    • 对于“资源组”,请选择“使用现有”,然后选择“myResourceGroup”。For Resource group, select Use existing and choose myResourceGroup. 如果没有“myResourceGroup”,请选择“新建”,然后键入“myResourceGroup”。If myResourceGroup doesn't exist, select Create New and type myResourceGroup.
    • 从“位置”下拉菜单中选择“中国北部”。From the Location drop-down menu, choose China North.
    • 单击“创建”,创建恢复服务保管库。Click Create to create your Recovery Services vault.

创建保管库后,它会显示在“恢复服务保管库”的列表中。Once your vault is created, it appears in the list of Recovery Services vaults.

下载恢复服务代理Download Recovery Services agent

Azure 恢复服务 (MARS) 代理在 Windows Server 和恢复服务保管库之间创建关联。The Azure Recovery Services (MARS) agent creates an association between Windows Server and your Recovery Services vault. 以下过程介绍如何将代理下载到服务器。The following procedure explains how to download the agent to your server.

  1. 在恢复服务保管库列表中,选择“myRecoveryServicesVault”以打开其仪表板。From the list of Recovery Services vaults, select myRecoveryServicesVault to open its dashboard.

    提供保管库信息

  2. 在保管库仪表板菜单中,单击“备份”。On the vault dashboard menu, click Backup.

  3. 在“备份目标”菜单上:On the Backup Goal menu:

    • 对于“工作负载的运行位置?”,请选择“本地”for Where is your workload running?, selectOn-premises,

    • 对于“要备份的项?”,请选择“文件和文件夹”以及“系统状态”for What do you want to backup?, select Files and folders and System State

      提供保管库信息

  4. 单击“准备基础结构”以打开“准备基础结构”菜单。Click Prepare Infrastructure to open the Prepare infrastructure menu.

  5. 在“准备基础结构”菜单上,单击“下载 Windows Server 或 Windows 客户端的代理”,下载 MARSAgentInstaller.exe。On the Prepare infrastructure menu, click Download Agent for Windows Server or Windows Client to download the MARSAgentInstaller.exe.

    准备基础结构

    安装程序单独打开浏览器并下载 MARSAgentInstaller.exe。The installer opens a separate browser and downloads MARSAgentInstaller.exe.

  6. 运行此下载文件前,请在“准备基础结构”菜单上单击“下载”,并保存“保管库凭据”文件。Before you run the downloaded file, on the Prepare infrastructure menu click Download and save the Vault Credentials file. 需要保管库凭据才能将 MARS 代理与恢复服务保管库连接。Vault credentials are required to connect the MARS Agent with the Recovery Services vault.

    准备基础结构

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

  1. 找到并双击已下载的 MARSagentinstaller.exe。Locate and double-click the downloaded MARSagentinstaller.exe.

  2. 此时会显示 Azure 恢复服务代理安装向导。The Azure Recovery Services Agent Setup Wizard appears. 执行向导的过程中,显示提示时请提供以下信息,然后单击“注册”。As you go through the wizard, provide the following information when prompted and click Register.

    • 文件夹的安装和缓存位置。Location for the installation and cache folder.

    • 代理服务器信息(如果使用代理服务器连接到 Internet)。Proxy server info if you use a proxy server to connect to the internet.

    • 用户名和密码详细信息(如果使用经验证的代理)。Your user name and password details if you use an authenticated proxy.

      准备基础结构

  3. 向导结束时,单击“继续注册”,并提供先前过程中下载的“保管库凭据”文件。At the end of the wizard, click Proceed to Registration and provide the Vault Credentials file you downloaded in the previous procedure.

  4. 出现提示时,请提供在 Windows Server 中加密备份的加密密码。When prompted, provide an encryption passphrase to encrypt backups from Windows Server. 请将密码保存于安全位置,因为若密码丢失,Microsoft 无法恢复密码。Save the passphrase in a secure location as Microsoft cannot recover the passphrase if it is lost.

  5. 单击“完成” 。Click Finish.

配置备份和保留期Configure Backup and Retention

使用 Azure 恢复服务代理规划何时将 Windows Server 备份到 Azure。You use the Azure Recovery Services agent to schedule when backups to Azure, occur on Windows Server. 在代理下载到的服务器上执行以下步骤。Execute the following steps on the server where you downloaded the agent.

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

  2. 在恢复服务代理控制台中,单击“操作”窗格中的“计划备份”。In the Recovery Services agent console, click Schedule Backup under the Actions Pane.

    准备基础结构

  3. 单击“下一步”,导航到“选择要备份的项”页面。Click Next to navigate to the Select Items to Back up page.

  4. 单击“添加项”,然后在打开的对话框中选择“系统状态”,以及要备份的文件或文件夹。Click Add Items and from the dialog box that opens, select System State and files or folders that you want to back up. Then click OK.

  5. 单击“下一步”。Click Next.

  6. 在“指定备份计划(系统状态)”页上,指定需触发系统状态备份的时间(哪天或哪周),然后单击“下一步”。On the Specify Backup Schedule (System State) page, specify the time of the day, or week when backups need to be triggered for System State and click Next.

  7. 在“选择保留策略(系统状态)”页上,为系统状态的备份副本选择“保留策略”,然后单击“下一步”。On the Select Retention Policy (System State) page, select the Retention Policy for the backup copy for System State and click Next.

  8. 同样,为选择的文件和文件夹选择备份计划和保留策略。Similarly, select the backup schedule and retention policy for selected files and folders.

  9. 在“选择初始备份类型”页上,选择“自动通过网络”,然后单击“下一步”。On the Choose Initial Back up Type page, select Automatically over the network, and click Next.

  10. 在“确认”页上检查信息,并单击“完成”。On the Confirmation page, review the information, and click Finish.

  11. 在向导完成创建备份计划后,请单击“关闭”。After the wizard finishes creating the backup schedule, click Close.

执行即席备份Perform an ad-hoc back up

备份作业运行时表示计划已建立。You have established the schedule when backup jobs run. 但服务器尚未备份。However, you have not backed up the server. 运行按需备份是灾难恢复最佳做法,可确保服务器的数据弹性。It is a disaster recovery best practice to run an on-demand backup to ensure data resiliency for your server.

  1. 在 Azure 恢复服务代理控制台中,单击“立即备份”。In the Azure Recovery Services agent console, click Back Up Now.

    准备基础结构

  2. 在“立即备份”向导上,从“文件和文件夹”或“系统状态”中选择要备份的内容,然后单击“下一步”。On the Back Up Now wizard, select one from Files and Folders or System State that you want to back up and click Next

  3. 在“确认”页上,检查“立即备份”向导用于备份服务器的设置。On the Confirmation page, review the settings that the Back Up Now wizard uses to back up your server. 然后单击“备份”。Then click Back Up.

  4. 单击“关闭”以关闭向导。Click Close to close the wizard. 如果在备份过程完成之前关闭向导,向导将继续在后台运行。If you close the wizard before the back up process finishes, the wizard continues to run in the background.

  5. 完成初始备份后,MARS 代理控制台的“作业”窗格中会显示“作业已完成”状态。After the initial backup is completed, Job completed status appears in Jobs pane of the MARS agent console.

后续步骤Next steps

本教程使用 Azure 门户执行了以下操作:In this tutorial, you used the Azure portal to:

  • 创建恢复服务保管库Create a Recovery Services vault
  • 下载 Azure 恢复服务代理Download the Azure Recovery Services agent
  • 安装代理Install the agent
  • 为 Windows Server 配置备份Configure backup for Windows Server
  • 执行按需备份Perform an on-demand backup