您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

在 Azure 中备份虚拟机Back up a virtual machine in Azure

可以通过 Azure 门户创建 Azure 备份。Azure backups can be created through the Azure portal. 此方法提供基于浏览器的用户界面用于创建和配置 Azure 备份及所有相关的资源。This method provides a browser-based user interface to create and configure Azure backups and all related resources. 可以通过定期创建备份来保护数据。You can protect your data by taking backups at regular intervals. Azure 备份可创建恢复点,这些恢复点可存储在异地冗余的恢复保管库中。Azure Backup creates recovery points that can be stored in geo-redundant recovery vaults. 本文详细介绍如何使用 Azure 门户备份虚拟机 (VM)。This article details how to back up a virtual machine (VM) with the Azure portal.

参考本快速入门可在现有的 Azure VM 上备份。This quickstart enables backup on an existing Azure VM. 如果需要创建 VM,可以使用 Azure 门户创建 VMIf you need to create a VM, you can create a VM with the Azure portal.

登录 AzureLog in to Azure

通过 https://portal.azure.com 登录到 Azure 门户。Log in to the Azure portal at https://portal.azure.com.

选择要备份的 VMSelect a VM to back up

在恢复服务保管库中创建一个简单的已计划每日备份。Create a simple scheduled daily backup to a Recovery Services Vault.

  1. 在左侧菜单中选择“虚拟机”。 In the menu on the left, select Virtual machines.
  2. 从列表中选择要备份的 VM。From the list, choose a VM to back up. 如果使用了 VM 快速入门教程中的示例命令,VM 在 myResourceGroup 资源组中名为 myVMIf you used the sample VM quickstart commands, the VM is named myVM in the myResourceGroup resource group.
  3. 在“操作” 部分,选择“备份” 。In the Operations section, choose Backup. 此时会打开“启用备份”窗口。 The Enable backup window opens.

在 VM 上启用备份Enable backup on a VM

恢复服务保管库是一个逻辑容器,用于存储每个受保护资源(例如 Azure VM)的备份数据。A Recovery Services vault is a logical container that stores the backup data for each protected resource, such as Azure VMs. 运行受保护资源的备份作业时,该作业会在恢复服务保管库中创建一个恢复点。When the backup job for a protected resource runs, it creates a recovery point inside the Recovery Services vault. 然后,可以使用其中一个恢复点将数据还原到给定的时间点。You can then use one of these recovery points to restore data to a given point in time.

  1. 选择“新建”并提供新保管库的名称,例如 myRecoveryServicesVaultSelect Create new and provide a name for the new vault, such as myRecoveryServicesVault.

  2. 选择“使用现有”(如果尚未选择),并从下拉菜单中选择 VM 的资源组。 If not already selected, choose Use existing, then select the resource group of your VM from the drop-down menu.

    在 Azure 门户中启用 VM 备份

    默认情况下,保管库是针对异地冗余存储设置的。By default, the vault is set for Geo-Redundant storage. 为了进一步保护数据,此存储冗余级别可确保将备份数据复制到距离主要区域数百英里以外的 Azure 次要区域。To further protect your data, this storage redundancy level ensures that your backup data is replicated to a secondary Azure region that is hundreds of miles away from the primary region.

    创建并使用策略来定义备份作业的运行时间以及恢复点的存储期限。You create and use policies to define when a backup job runs and how long the recovery points are stored. 默认保护策略每天运行备份作业,并将恢复点保留 30 天。The default protection policy runs a backup job each day and retains recovery points for 30 days. 可以使用这些默认策略值来快速保护 VM。You can use these default policy values to quickly protect your VM.

  3. 若要接受默认备份策略值,请选择“启用备份”。 To accept the default backup policy values, select Enable Backup.

片刻之后即可创建恢复服务保管库。It takes a few moments to create the Recovery Services vault.

启动备份作业Start a backup job

可以立即开始备份,而不用等待默认策略根据计划的时间运行作业。You can start a backup now rather than wait for the default policy to run the job at the scheduled time. 第一个备份作业会创建一个完整恢复点。This first backup job creates a full recovery point. 此初始备份后的每个备份作业会创建增量恢复点。Each backup job after this initial backup creates incremental recovery points. 增量恢复点有利于存储并具有时效性,因为它们仅传输自上次备份以来所做的更改。Incremental recovery points are storage and time-efficient, as they only transfer changes made since the last backup.

  1. 在 VM 的“备份”窗口中,选择“立即备份”。 On the Backup window for your VM, select Backup now.

    在 Azure 门户中执行即时 VM 备份

  2. 若要接受 30 天备份保留策略,请保留默认的“保留备份截止日期”日期。 To accept the backup retention policy of 30 days, leave the default Retain Backup Till date. 若要启动作业,请选择“备份”。 To start the job, select Backup.

监视备份作业Monitor the backup job

VM 的“备份”窗口中显示了备份的状态,以及已完成的还原点数目。 In the Backup window for your VM, the status of the backup and number of completed restore points are shown. VM 备份作业完成后,“概述”窗口的右侧会显示有关“上次备份时间”、“最新还原点”和“最旧还原点”的信息。 Once the VM backup job is complete, information on the Last backup time, Latest restore point, and Oldest restore point is shown on the right-hand side of the Overview window.

清理部署Clean up deployment

如果不再需要,可以在 VM 上禁用保护,删除还原点和恢复服务保管库,然后删除资源组和关联的 VM 资源When no longer needed, you can disable protection on the VM, remove the restore points and Recovery Services vault, then delete the resource group and associated VM resources

如果想要继续学习有关如何还原 VM 数据的备份教程,请跳过本部分中的步骤,并转到后续步骤If you are going to continue on to a Backup tutorial that explains how to restore data for your VM, skip the steps in this section and go to Next steps.

  1. 选择 VM 的“备份”选项。 Select the Backup option for your VM.

  2. 选择“...更多”显示更多选项,再选择“停止备份”。 Select ...More to show additional options, then choose Stop backup.

    通过 Azure 门户停止 VM 备份

  3. 从下拉菜单中选择“删除备份数据”。 Select Delete Backup Data from the drop-down menu.

  4. 在“键入备份项的名称”对话框中输入 VM 名称,例如 myVMIn the Type the name of the Backup item dialog, enter your VM name, such as myVM. 选择“停止备份” 。Select Stop Backup.

    停止 VM 备份并删除恢复点之后,可以删除资源组。Once the VM backup has been stopped and recovery points removed, you can delete the resource group. 如果使用了现有的 VM,你可能希望保留资源组和 VM。If you used an existing VM, you may wish to leave the resource group and VM in place.

  5. 在左侧菜单中,选择“资源组” 。In the menu on the left, select Resource groups.

  6. 从列表中选择自己的资源组。From the list, choose your resource group. 如果使用了 VM 快速入门教程中的示例命令,资源组名为 myResourceGroupIf you used the sample VM quickstart commands, the resource group is named myResourceGroup.

  7. 选择“删除资源组” 。Select Delete resource group. 若要确认删除,请输入资源组名称,选择“删除”。 To confirm, enter the resource group name, then select Delete.

    通过 Azure 门户删除资源组

后续步骤Next steps

本快速入门介绍了如何创建恢复服务保管库,如何在 VM 上启用保护,以及如何创建初始恢复点。In this quickstart, you created a Recovery Services vault, enabled protection on a VM, and created the initial recovery point. 若要详细了解 Azure 备份和恢复服务,请继续学习其他教程。To learn more about Azure Backup and Recovery Services, continue to the tutorials.