使用 Azure 备份服务管理 Azure VM 备份Manage Azure VM backups with Azure Backup service

本文介绍了如何使用 Azure 备份服务管理 Azure 虚拟机 (VM)。This article describes how to manage Azure virtual machines (VMs) that are backed up by using the Azure Backup service. 本文还概述了可以在保管库仪表板上找到的备份信息。The article also summarizes the backup information you can find on the vault dashboard.

在 Azure 门户中,可以使用恢复服务保管库仪表板访问保管库信息,包括:In the Azure portal, the Recovery Services vault dashboard provides access to vault information, including:

  • 最新备份,也是最新还原点。The latest backup, which is also the latest restore point.
  • 备份策略。The backup policy.
  • 所有备份快照的总大小。The total size of all backup snapshots.
  • 启用了备份的 VM 数。The number of VMs that are enabled for backups.

可以使用仪表板以及通过向下钻取到各个 VM 来管理备份。You can manage backups by using the dashboard and by drilling down to individual VMs. 若要开始计算机备份,请在仪表板上打开保管库。To begin machine backups, open the vault on the dashboard.

具有滑块的完整仪表板视图

在仪表板中查看 VMView VMs on the dashboard

若要在仪表板中查看 VM,请执行以下操作:To view VMs on the vault dashboard:

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

  2. 在“中心”菜单上选择“浏览”。On the Hub menu, select Browse. 在资源列表中,键入“恢复服务”。In the list of resources, type Recovery Services. 在键入时,列表会根据你的输入进行筛选。As you type, the list is filtered based on your input. 选择“恢复服务保管库”。Select Recovery Services vaults.

    创建恢复服务保管库

  3. 为了便于使用,请右键单击保管库,然后选择“固定到仪表板”。For ease of use, right-click the vault and select Pin to dashboard.

  4. 打开保管库仪表板。Open the vault dashboard.

    打开保管库仪表板和“设置”窗格

  5. 在“备份项”磁贴中,选择“Azure 虚拟机”。On the Backup Items tile, select Azure Virtual Machines.

    打开“备份项”磁贴

  6. 在“备份项”窗格上,可以查看受保护 VM 的列表。On the Backup Items pane, you can view the list of protected VMs. 在此示例中,保管库保护着一台虚拟机:demobackup。In this example, the vault protects one virtual machine: demobackup.

    查看“备份项”窗格

  7. 从保管库项的仪表板中,修改备份策略,运行按需备份,停止或恢复 VM 保护,删除备份数据,查看还原点,以及运行还原。From the vault item's dashboard, modify backup policies, run an on-demand backup, stop or resume protection of VMs, delete backup data, view restore points, and run a restore.

    “备份项”仪表板和“设置”窗格

管理 VM 的备份策略Manage backup policy for a VM

若要管理备份策略,请执行以下操作:To manage a backup policy:

  1. 登录到 Azure 门户Sign in to the Azure portal. 打开保管库仪表板。Open the vault dashboard.

  2. 在“备份项”磁贴中,选择“Azure 虚拟机”。On the Backup Items tile, select Azure Virtual Machines.

    打开“备份项”磁贴

  3. 在“备份项”窗格上,可以查看受保护 VM 及其上次备份状态和最新还原点时间的列表。On the Backup Items pane, you can view the list of protected VMs and last backup status with latest restore points time.

    查看“备份项”窗格

  4. 从保管库项的仪表板中,你可以选择备份策略。From the vault item's dashboard, you can select a backup policy.

    • 若要切换策略,请选择其他策略,然后选择“保存”。To switch policies, select a different policy and then select Save. 新策略立即应用于保管库。The new policy is immediately applied to the vault.

      选择备份策略

运行按需备份Run an on-demand backup

为 VM 设置保护后,可以为 VM 运行按需备份。You can run an on-demand backup of a VM after you set up its protection. 请记住以下详细信息:Keep these details in mind:

  • 如果初始备份已挂起,则按需备份会在恢复服务保管库中创建 VM 的完整副本。If the initial backup is pending, on-demand backup creates a full copy of the VM in the Recovery Services vault.
  • 如果初始备份已完成,按需备份仅将以前快照的更改发送到恢复服务保管库。If the initial backup is complete, an on-demand backup will only send changes from the previous snapshot to the Recovery Services vault. 也就是说,后续备份始终是增量备份。That is, later backups are always incremental.
  • 按需备份的保留期范围是你在触发备份时指定的保留期值。The retention range for an on-demand backup is the retention value that you specify when you trigger the backup.

若要触发按需备份,请执行以下操作:To trigger an on-demand backup:

  1. 保管库项仪表板上,在“受保护的项”下,选择“备份项”。On the vault item dashboard, under Protected Item, select Backup Item.

    “立即备份”选项

  2. 从“备份管理类型”下,选择“Azure 虚拟机”。From Backup Management Type, select Azure Virtual Machine. “备份项(Azure 虚拟机)”窗格随即出现。The Backup Item (Azure Virtual Machine) pane appears.

  3. 选择一个 VM,选择“立即备份”来创建一个按需备份。Select a VM and select Backup Now to create an on-demand backup. “立即备份”窗格随即出现。The Backup Now pane appears.

  4. 在“备份保留截止日期”字段中,指定要将备份保留到的日期。In the Retain Backup Till field, specify a date for the backup to be retained.

    “立即备份”日历

  5. 选择“确定”以运行备份作业。Select OK to run the backup job.

若要跟踪作业进度,请在保管库仪表板中,选择“备份作业”磁贴。To track the job's progress, on the vault dashboard, select the Backup Jobs tile.

停止保护 VMStop protecting a VM

可通过两种方法来停止保护 VM:There are two ways to stop protecting a VM:

  • 停止保护并保留备份数据Stop protection and retain backup data. 此选项将使所有将来的备份作业停止保护你的 VM;但是,Azure 备份服务将保留已备份的恢复点。This option will stop all future backup jobs from protecting your VM; however, Azure Backup service will retain the recovery points that have been backed up. 你需要付费才能将恢复点保留在保管库中(有关详细信息,请参阅 Azure 备份定价)。You'll need to pay to keep the recovery points in the vault (see Azure Backup pricing for details). 如果需要,你将能够还原 VM。You'll be able to restore the VM if needed. 如果决定恢复 VM 保护,则可以使用“恢复备份”选项。If you decide to resume VM protection, then you can use Resume backup option.
  • 停止保护并删除备份数据Stop protection and delete backup data. 此选项将使所有将来的备份作业停止保护你的 VM 并删除所有恢复点。This option will stop all future backup jobs from protecting your VM and delete all the recovery points. 你将无法还原 VM,也无法使用“恢复备份”选项。You won't be able to restore the VM nor use Resume backup option.

Note

如果在不停止备份的情况下删除数据源,则新备份将会失败。If you delete a data source without stopping backups, new backups will fail. 旧恢复点将根据策略过期,但始终会保留一个最后的恢复点,直至你显式停止备份并删除数据。Old recovery points will expire according to the policy, but one last recovery point will always be kept until you stop the backups and delete the data.

停止保护并保留备份数据Stop protection and retain backup data

若要停止保护并保留 VM 的数据,请执行以下操作:To stop protection and retain data of a VM:

  1. 保管库项的仪表板上,选择“停止备份”。On the vault item's dashboard, select Stop backup.

  2. 选择“保留备份数据”,并根据需要确认你的选择。Choose Retain Backup Data, and confirm your selection as needed. 如果需要,添加注释。Add a comment if you want. 如果不确定项名称,将鼠标悬停在感叹号上面即可查看该名称。If you aren't sure of the item's name, hover over the exclamation mark to view the name.

    保留备份数据

一条通知将让你获悉备份作业已停止。A notification lets you know that the backup jobs have been stopped.

停止保护并删除备份数据Stop protection and delete backup data

若要停止保护并删除 VM 的数据,请执行以下操作:To stop protection and delete data of a VM:

  1. 保管库项的仪表板上,选择“停止备份”。On the vault item's dashboard, select Stop backup.

  2. 选择“删除备份数据”,并根据需要确认你的选择。Choose Delete Backup Data, and confirm your selection as needed. 输入备份项的名称,并根据需要添加注释。Enter the name of the backup item and add a comment if you want.

    删除备份数据

恢复对 VM 的保护Resume protection of a VM

如果在停止 VM 保护期间选择了“停止保护并保留备份数据”选项,则可以使用“恢复备份”。If you chose Stop protection and retain backup data option during stop VM protection, then you can use Resume backup. 如果选择了“停止保护并删除备份数据”选项或“删除备份数据”,则此选项不可用。This option is not available if you choose Stop protection and delete backup data option or Delete backup data.

若要恢复 VM 保护,请执行以下操作:To resume protection for a VM:

  1. 保管库项的仪表板上,选择“恢复备份”。On the vault item's dashboard, select Resume backup.

  2. 管理备份策略中的步骤为 VM 分配策略。Follow the steps in Manage backup policies to assign the policy for the VM. 不需要选择 VM 的初始保护策略。You don't need to choose the VM's initial protection policy.

  3. 将备份策略应用于 VM 后,你会看到以下消息:After you apply the backup policy to the VM, you see the following message:

    指明已成功保护 VM 的消息

删除备份数据Delete backup data

有两种方法可以删除 VM 的备份数据:There are two ways to delete a VM's backup data:

  • 在保管库项仪表板中,选择“停止备份”,然后按照“停止保护并删除备份数据”选项的说明进行操作。From the vault item dashboard, select Stop backup and follow the instructions for Stop protection and delete backup data option.

    选择“停止备份”

  • 在保管库项仪表板中,选择“删除备份数据”。From the vault item dashboard, select Delete backup data. 如果在停止 VM 保护期间选择了“停止保护并保留备份数据”选项,则会启用此选项This option is enabled if you had chosen to Stop protection and retain backup data option during stop VM protection

    选择“删除备份”

    • 保管库项仪表板中,选择“删除备份数据”。On the vault item dashboard, select Delete backup data.

    • 键入备份项的名称以确认你要删除恢复点。Type the name of the backup item to confirm that you want to delete the recovery points.

      删除备份数据

    • 若要删除项的备份数据,请选择“删除”。To delete the backup data for the item, select Delete. 一条通知消息将让你获悉备份数据已删除。A notification message lets you know that the backup data has been deleted.

为保护数据,Azure 备份包含了软件删除功能。To protect your data, Azure Backup includes the soft delete feature. 使用软删除,即使在删除 VM 的备份(所有恢复点)后,备份数据也会额外保留 14 天。With soft delete, even after the backup (all the recovery points) of a VM is deleted, the backup data is retained for 14 additional days. 有关详细信息,请参阅软删除文档For more information, see the soft delete documentation.

Note

删除备份数据时,将删除所有关联的恢复点。When you delete backup data you delete all associated recovery points. 无法选择要删除的特定恢复点。You can't choose specific recovery points to delete.

主数据源不再存在的备份项Backup item where primary data source no longer exists

  • 如果为 Azure 备份配置的 Azure VM 在没有停止保护的情况下被删除或移动,则计划备份作业和按需(临时)备份作业都将失败,并出现 UserErrorVmNotFoundV2 错误。If Azure VMs configured for Azure backup are either deleted or moved without stopping protection, then both scheduled backup jobs and on demand (ad-hoc) backup jobs will fail with the error UserErrorVmNotFoundV2. 备份预检查将仅对失败的按需备份作业显示为“严重”(不会显示失败的计划作业)。The backup pre-check will appear as critical only for failed on-demand backup jobs (failed scheduled jobs are not displayed).
  • 这些备份项在系统中保持活动状态,并遵守用户设置的备份和保留策略。These backup items remain active in the system adhering to the backup and retention policy set by the user. 这些 Azure VM 的备份数据将根据保留策略保留。The backed-up data for these Azure VMs will be retained according to the retention policy. 过期的恢复点(最后一个恢复点除外)将根据备份策略中设置的保留范围进行清理。The expired recovery points (except the last recovery point) are cleaned according to the retention range set in the backup policy.
  • 如果用户不再需要已删除资源的备份项/数据,由于最后一个恢复点会永久保留,并且会按适用的备份定价向用户收费,建议用户删除主数据源不再存在的备份项目,从而避免产生任何额外费用。Users are recommended to delete the backup items where the primary data source no longer exists to avoid any additional cost, if the backup item/data for the delete resources is no longer required as the last recovery point is retained forever and the user is charged as per the backup pricing applicable.

后续步骤Next steps