通过 VM 设置备份 Azure VMBack up an Azure VM from the VM settings

本文说明如何使用 Azure 备份服务备份 Azure VM。This article explains how to back up Azure VMs with the Azure Backup service. 可以使用多个方法备份 Azure VM:You can back up Azure VMs using a couple of methods:

  • 单个 Azure VM:本文中的说明介绍如何直接通过 VM 设置备份 Azure VM。Single Azure VM: The instructions in this article describe how to back up an Azure VM directly from the VM settings.
  • 多个 Azure VM:可以设置一个恢复服务保管库,然后为多个 Azure VM 配置备份。Multiple Azure VMs: You can set up a Recovery Services vault and configure backup for multiple Azure VMs. 按照此文中针对此方案的说明操作。Follow the instructions in this article for this scenario.

开始之前Before you start

  1. 了解备份工作原理。Learn how backup works.
  2. 概要了解 Azure VM 备份。Get an overview of Azure VM backup.

Azure VM 代理安装Azure VM agent installation

为了备份 Azure VM,Azure 备份会在 VM 代理上安装一个扩展,该代理在计算机上运行。In order to back up Azure VMs, Azure Backup installs an extension on the VM agent running on the machine. 如果 VM 是根据 Azure 市场映像创建的,则代理将运行。If your VM was created from an Azure marketplace image, the agent will be running. 在某些情况下(例如创建自定义 VM,或者从本地迁移计算机),In some cases, for example if you create a custom VM, or you migrate a machine from on-premises. 可能需要手动安装代理。you might need to install the agent manually.

  • 如果需要手动安装 VM 代理,请按 WindowsLinux VM 的说明操作。If you do need to install the VM agent manually, follow the instructions for Windows or Linux VMs.
  • 在安装代理后启用备份时,Azure 备份会将备份扩展安装到代理。After the agent is installed, when you enable backup, Azure Backup installs the backup extension to the agent. 它可以在没有用户干预的情况下更新和修补扩展。It updates and patches the extension without user intervention.

通过 Azure VM 设置进行备份Back up from Azure VM settings

  1. 登录到 Azure 门户Sign in to the Azure portal.

  2. 单击“所有服务”,在“筛选器”中键入“虚拟机”,然后单击“虚拟机” 。Click All services and in the Filter, type Virtual machines, and then click Virtual machines.

  3. 从 VM 列表中选择要备份的 VM。From the list of VMs select the VM you want to back up.

  4. 在 VM 菜单上单击“备份”。 On the VM menu, click Backup.

  5. 在“恢复服务保管库”中执行以下操作: In Recovery Services vault, do the following:

    • 如果已有一个保管库,请单击“选择现有”,然后选择一个保管库 。If you already have a vault, click Select existing, and select a vault.
    • 如果没有保管库,请单击“新建”。 If you don't have a vault, click Create new. 指定保管库的名称。Specify a name for the vault. 它在 VM 所在的区域和资源组中创建。It's created in the same region and resource group as the VM. 直接通过 VM 设置启用备份时,不能修改这些设置。You can't modify these settings when you enable backup directly from the VM settings.

    启用备份向导

  6. 在“选择备份策略”中执行以下操作:In Choose backup policy, do the following:

    • 保留默认策略。Leave the default policy. 这样会每天一次在指定的时间备份 VM,并在保管库中保留备份 30 天。This backs up the VM once a day at the time specified, and retains backups in the vault for 30 days.
    • 选择现有的备份策略(如果有)。Select an existing backup policy if you have one.
    • 创建一项新策略,然后定义策略设置。Create a new policy, and define the policy settings.

    选择备份策略

  7. 单击“启用备份”。Click Enable Backup. 这样会将备份策略与 VM 相关联。This associates the backup policy with the VM.

    “启用备份”按钮

  8. 可在门户通知中跟踪配置进度。You can track the configuration progress in the portal notifications.

  9. 待作业完成后,请在 VM 菜单中单击“备份”。After the job completes, in the VM menu, click Backup. 页面会显示 VM 的备份状态、有关恢复点的信息、正在运行的作业以及发出的警报。The page shows backup status for the VM, information about recovery points, jobs running, and alerts issued.

    备份状态

  10. 启用备份后,会运行初始备份。After enabling backup, an initial backup runs. 可以立即启动初始备份,也可以等待它按备份计划启动。You can start the initial backup immediately, or wait until it starts in accordance with the backup schedule.

    • 在初始备份完成之前,“上次备份状态” 显示为“警告(初始备份挂起)” 。Until the initial backup completes, the Last backup status shows as Warning (Initial backup pending).
    • 若要查看下一个计划的备份何时运行,请单击备份策略名称。To see when the next scheduled backup will run, click the backup policy name.

立即运行备份Run a backup immediately

  1. 若要立即运行备份,请在 VM 菜单中单击“备份” > “立即备份”。To run a backup immediately, in the VM menu, click Backup > Backup now.

    运行备份

  2. 在“立即备份”中,使用日历控件选择保留此恢复点的最后一天,然后单击“确定”。In Backup Now use the calendar control to select until when the recovery point will be retained > and OK.

    备份保留日期

  3. 门户通知会告知你备份作业已触发。Portal notifications let you know the backup job has been triggered. 若要监视备份进度,请单击“查看所有作业” 。To monitor backup progress, click View all jobs.

从恢复服务保管库备份Back up from the Recovery Services vault

按照本文中的说明为 Azure VM 启用备份,方法是:设置一个 Azure 备份恢复服务保管库,然后在保管库中启用备份。Follow the instructions in this article to enable backup for Azure VMs by setting up an Azure Backup Recovery Services vault, and enabling backup in the vault.

后续步骤Next steps