常见问题 - 备份 Azure VMFrequently asked questions-Back up Azure VMs

本文解答有关使用 Azure 备份服务备份 Azure VM 的常见问题。This article answers common questions about backing up Azure VMs with the Azure Backup service.

BackupBackup

哪些 VM 映像可以在创建时启用备份功能?Which VM images can be enabled for backup when I create them?

创建 VM 时,可以为运行受支持操作系统的 VM 启用备份。When you create a VM, you can enable backup for VMs running supported operating systems.

为什么初始备份需要很长的时间才能完成?Why Initial backup is taking lot of time to complete?

初始备份始终是完整备份,它取决于数据大小和处理备份的时间。Initial backup is always a full backup and it will depend on the size of the data and when the backup is processed.
若要提高备份性能,请参阅备份最佳做法备份注意事项备份性能To improve backup performance see, backup best practices; Backup considerations and Backup Performance
增量备份的总备份时间不超过 24 小时,但是,首次备份可能并非如此。Although the total backup time for incremental backups is less than 24 hours, that might not be the case for the first backup.

备份成本包含在 VM 成本内吗?Is the backup cost included in the VM cost?

否。No. 备份成本独立于 VM 的成本。Backup costs are separate from a VM's costs. 详细了解 Azure 备份定价Learn more about Azure Backup pricing.

为 VM 启用备份需要哪些权限?Which permissions are required to enable backup for a VM?

如果你是 VM 参与者,便可以在 VM 上启用备份。If you're a VM contributor, you can enable backup on the VM. 如果你使用的是自定义角色,则需要具有以下权限才可在 VM 上启用备份:If you're using a custom role, you need the following permissions to enable backup on the VM:

  • Microsoft.RecoveryServices/Vaults/writeMicrosoft.RecoveryServices/Vaults/write
  • Microsoft.RecoveryServices/Vaults/readMicrosoft.RecoveryServices/Vaults/read
  • Microsoft.RecoveryServices/locations/*Microsoft.RecoveryServices/locations/*
  • Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/*/readMicrosoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/*/read
  • Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/readMicrosoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/read
  • Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/writeMicrosoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/write
  • Microsoft.RecoveryServices/Vaults/backupFabrics/backupProtectionIntent/writeMicrosoft.RecoveryServices/Vaults/backupFabrics/backupProtectionIntent/write
  • Microsoft.RecoveryServices/Vaults/backupPolicies/readMicrosoft.RecoveryServices/Vaults/backupPolicies/read
  • Microsoft.RecoveryServices/Vaults/backupPolicies/writeMicrosoft.RecoveryServices/Vaults/backupPolicies/write

如果恢复服务保管库和 VM 的资源组不同,请确保具有恢复服务保管库资源组的写入权限。If your Recovery Services vault and VM have different resource groups, make sure you have write permissions in the resource group for the Recovery Services vault.

按需备份作业是否与计划的备份使用相同的保留计划?Does an on-demand backup job use the same retention schedule as scheduled backups?

否。No. 为按需备份作业指定保留期。Specify the retention range for an on-demand backup job. 默认情况下,从门户触发时,该作业会保留 30 天。By default, it's retained for 30 days when triggered from the portal.

我最近在一些 VM 上启用了 Azure 磁盘加密。I recently enabled Azure Disk Encryption on some VMs. 我的备份是否继续有效?Will my backups continue to work?

提供 Azure 备份访问 Key Vault 所需的权限。Provide permissions for Azure Backup to access the Key Vault. 请根据 Azure 备份 PowerShell 文档的“启用备份”部分中所述,在 PowerShell 中指定权限。Specify the permissions in PowerShell as described in the Enable backup section in the Azure Backup PowerShell documentation.

我将 VM 磁盘迁移到了托管磁盘。I migrated VM disks to managed disks. 我的备份是否继续有效?Will my backups continue to work?

是的,备份可以顺利工作。Yes, backups work seamlessly. 无需重新配置任何设置。There's no need to reconfigure anything.

为何在配置备份向导中看不到我的 VM?Why can't I see my VM in the Configure Backup wizard?

该向导只会列出保管库所在的同一区域中的 VM,以及不在备份的 VM。The wizard only lists VMs in the same region as the vault, and that aren't already being backed up.

我的 VM 已关闭。My VM is shut down. 按需备份或计划备份会运行吗?Will an on-demand or a scheduled backup work?

是的。Yes. 计算机关闭时,将运行备份。Backups run when a machine is shut down. 恢复点标记为崩溃一致。The recovery point is marked as crash consistent.

可以取消正在进行的备份作业吗?Can I cancel an in-progress backup job?

是的。Yes. 可以取消处于“正在创建快照”状态的备份作业。You can cancel the backup job in a Taking snapshot state. 如果作业正在从快照传输数据,则不能将它取消。You can't cancel a job if data transfer from the snapshot is in progress.

我对由 Azure 备份服务创建的资源组(例如 AzureBackupRG_<geo>_<number>)启用了锁定。I enabled a lock on the resource group created by Azure Backup Service (for example, AzureBackupRG_<geo>_<number>). 我的备份是否继续有效?Will my backups continue to work?

如果锁定 Azure 备份服务创建的资源组,则由于还原点的最大数目限制为 18 个,备份会开始失败。If you lock the resource group created by the Azure Backup Service, backups will start to fail as there's a maximum limit of 18 restore points.

删除锁定,并从该资源组中清除还原点集合,以使将来的备份成功。Remove the lock, and clear the restore point collection from that resource group to make the future backups successful. 按照这些步骤删除还原点集合。Follow these steps to remove the restore point collection.

Azure 备份是否支持标准 SSD 托管磁盘?Does Azure Backup support standard SSD-managed disks?

是的,Azure 备份支持标准 SSD 托管磁盘Yes, Azure Backup supports standard SSD managed disks.

可使用支持写入加速器 (WA) 的磁盘备份 VM 吗?Can we back up a VM with a Write Accelerator (WA)-enabled disk?

无法在已启用 WA 的磁盘上拍摄快照。Snapshots can't be taken on the WA-enabled disk. 但是,Azure 备份服务可以从备份中排除已启用 WA 的磁盘。However, the Azure Backup service can exclude the WA-enabled disk from backup.

我有一个安装了写入加速器 (WA) 磁盘和 SAP HANA 的 VM。I have a VM with Write Accelerator (WA) disks and SAP HANA installed. 我该如何备份?How do I back up?

Azure 备份无法备份已启用 WA 的磁盘,但可以将其从备份中排除。Azure Backup can't back up the WA-enabled disk but can exclude it from backup. 但是,备份不会提供数据库一致性,因为未备份已启用 WA 的磁盘上的信息。However, the backup won't provide database consistency because information on the WA-enabled disk isn't backed up. 如果需要备份操作系统磁盘和备份未启用 WA 的磁盘,则可以使用此配置备份磁盘。You can back up disks with this configuration if you want operating system disk backup, and backup of disks that aren't WA-enabled.

Azure 备份为 SAP HANA 数据库提供了流式备份解决方案,其 RPO 为 15 分钟。Azure Backup provides a streaming backup solution for SAP HANA databases with an RPO of 15 minutes. 其通过 SAP 进行了 Backint 认证,利用 SAP HANA 的本机 API 提供本机备份支持。It's Backint certified by SAP to provide a native backup support leveraging SAP HANA’s native APIs. 了解有关在 Azure VM 中备份 SAP HANA 数据库的详细信息。Learn more about backing up SAP HANA databases in Azure VMs.

从我在 VM 备份策略中设置的计划备份时间开始,我可以预期的备份开始时间的最大延迟是多少?What is the maximum delay I can expect in backup start time from the scheduled backup time I have set in my VM backup policy?

计划备份将在计划备份时间的 2 小时内触发。The scheduled backup will be triggered within 2 hours of the scheduled backup time. 例如,如果 100 个 VM 的备份开始时间安排在凌晨 2:00,则最晚到凌晨 4:00,所有 100 个 VM 的备份作业都将运行。For example, If 100 VMs have their backup start time scheduled at 2:00 AM, then by 4:00 AM at the latest all the 100 VMs will have their backup job in progress. 如果计划的备份由于停机而暂停并已恢复或重试,则备份可以在此计划的两小时时限之外启动。If scheduled backups have been paused because of an outage and resumed or retried, then the backup can start outside of this scheduled two-hour window.

每日备份点允许的最短保持期是多久?What is the minimum allowed retention range for a daily backup point?

Azure 虚拟机备份策略支持的最短保持期为 7 天,最长为 9999 天。Azure Virtual Machine backup policy supports a minimum retention range from seven days up to 9999 days. 对少于 7 天的现有 VM 备份策略进行任何修改都需要进行更新,以满足 7 天的最小保留期限。Any modification to an existing VM backup policy with less than seven days will require an update to meet the minimum retention range of seven days.

如果更改了 VM 或 VM 资源组名称的大小写,会发生什么情况?What happens if I change the case of the name of my VM or my VM resource group?

如果更改 VM 或 VM 资源组的大小写(更改为大写或小写),备份项名称的大小写不会更改。If you change the case (to upper or lower) of your VM or VM resource group, the case of the backup item name won't change. 但是,这是 Azure 备份的预期行为。However, this is expected Azure Backup behavior. 大小写更改不会出现在备份项中,而是在后端更新。The case change won't appear in the backup item, but is updated at the backend.

能否备份或还原附加到 VM 的选择性磁盘?Can I back up or restore selective disks attached to a VM?

Azure 备份现在支持使用 Azure 虚拟机备份解决方案进行选择性磁盘备份和还原。Azure Backup now supports selective disk backup and restore using the Azure Virtual Machine backup solution. 有关详细信息,请参阅 Azure VM 的选择性磁盘备份和还原For more information, see Selective disk backup and restore for Azure VMs.

如果在备份过程中发生租户更改,是否保留托管标识?Are managed identities preserved if a tenant change occurs during backup?

如果发生租户更改,则需要禁用并重新启用托管标识才能重新运行备份。If tenant changes occur, you're required to disable and re-enable managed identities to make backups work again.

还原Restore

如何确定是仅还原磁盘还是要还原整个 VM?How do I decide whether to restore disks only or a full VM?

可将 VM 还原视为 Azure VM 的快速创建选项。Think of a VM restore as a quick create option for an Azure VM. 此选项会更改磁盘名称、磁盘使用的容器、公共 IP 地址和网络接口名称。This option changes disk names, containers used by the disks, public IP addresses, and network interface names. 创建 VM 时,更改将维护唯一资源。The change maintains unique resources when a VM is created. VM 不会添加到可用性集。The VM isn't added to an availability set.

若要执行以下操作,可使用还原磁盘选项:You can use the restore disk option if you want to:

  • 自定义创建的 VM。Customize the VM that gets created. 例如,更改大小。For example, change the size.
  • 添加备份时不存在的配置设置。Add configuration settings that weren't there at the time of backup.
  • 控制所创建的资源的命名约定。Control the naming convention for resources that are created.
  • 将 VM 添加到可用性集。Add the VM to an availability set.
  • 添加必须使用 PowerShell 或模板进行配置的其他任何设置。Add any other setting that must be configured using PowerShell or a template.

升级到托管磁盘后,是否可以还原非托管 VM 磁盘的备份?Can I restore backups of unmanaged VM disks after I upgrade to managed disks?

是的,可以使用从非托管磁盘迁移到托管磁盘之前创建的备份。Yes, you can use backups taken before disks were migrated from unmanaged to managed.

如何将 VM 还原至将它迁移到托管磁盘之前的某个还原点?How do I restore a VM to a restore point before the VM was migrated to managed disks?

还原过程保持不变。The restore process remains the same. 如果恢复点是 VM 具有非托管磁盘的时间点,则可以将磁盘还原为非托管磁盘If the recovery point is of a point-in-time when VM had unmanaged disks, you can restore disks as unmanaged. 如果当时 VM 具有托管磁盘,则可以将磁盘还原为托管磁盘If the VM had managed disks, then you can restore disks as managed disks. 然后,可以从这些磁盘创建 VMThen you can create a VM from those disks.

详细了解如何在 PowerShell 中执行此操作。Learn more about doing this in PowerShell.

如果还原无法创建 VM,还原中包含的磁盘会发生什么情况?If the restore fails to create the VM, what happens to the disks included in the restore?

如果是托管 VM 还原,则即使 VM 创建失败,也仍会还原磁盘。In the event of a managed VM restore, even if the VM creation fails, the disks will still be restored.

能否还原已删除的 VM?Can I restore a VM that's been deleted?

是的。Yes. 即使删除了 VM,也仍可以转到保管库中的相应备份项,然后从恢复点还原。Even if you delete the VM, you can go to the corresponding backup item in the vault and restore from a recovery point.

如何将 VM 还原到相同的可用性集?How do I restore a VM to the same availability sets?

对于托管磁盘 Azure VM,通过在还原为托管磁盘时在模板中提供选项来允许还原到可用性集。For Managed Disk Azure VMs, restoring to the availability sets is enabled by providing an option in the template while restoring as managed disks. 此模板包含名为“可用性集”的输入参数。This template has the input parameter called Availability sets.

我们提高还原速度?How do we get faster restore performances?

即时还原功能有助于更快地备份和从快照即时还原。Instant Restore capability helps with faster backups and instant restores from the snapshots.

更改已加密 VM 的密钥保管库设置时会发生什么情况?What happens when we change the key vault settings for the encrypted VM?

更改已加密 VM 的密钥保管库设置后,备份将继续使用新的详细信息集。After you change the key vault settings for the encrypted VM, backups will continue to work with the new set of details. 但是,从更改之前的恢复点还原后,必须先在密钥保管库中还原机密,然后才能从中创建 VM。However, after the restore from a recovery point before the change, you'll have to restore the secrets in a key vault before you can create the VM from it. 有关详细信息,请参阅此文For more information, see this article.

机密/密钥滚动更新等操作不需要此步骤,还原后可使用原来的密钥保管库。Operations like secret/key roll-over don't require this step and the same key vault can be used after restore.

在还原后我是否由于 VM 与域控制器的关系被破坏而可以访问 VM?Can I access the VM once restored due to a VM having broken relationship with domain controller?

可以,由于 VM 与域控制器的关系被破坏,因此在还原后可以访问 VM。Yes, you access the VM once restored due to a VM having broken relationship with domain controller. 有关详细信息,请参阅此文For more information, see this article

为什么还原操作需要很长时间才能完成?Why restore operation is taking long time to complete?

总还原时间取决于存储帐户的每秒输入/输出操作次数 (IOPS) 和吞吐量。The total restore time depends on the Input/output operations per second (IOPS) and the throughput of the storage account. 如果目标存储帐户加载了其他应用程序读写操作,则总还原时间可能会受到影响。The total restore time can be affected if the target storage account is loaded with other application read and write operations. 若要改进还原操作,请选择未加载其他应用程序数据的存储帐户。To improve restore operation, select a storage account that isn't loaded with other application data.

管理 VM 备份Manage VM backups

如果修改备份策略,会发生什么情况?What happens if I modify a backup policy?

VM 是使用已修改策略或新策略中的计划和保留设置备份的。The VM is backed up using the schedule and retention settings in the modified or new policy.

  • 如果延长保留期,则会根据新策略对现有的恢复点进行标记和保留。If retention is extended, existing recovery points are marked and kept in accordance with the new policy.
  • 如果缩短保留期,则会将恢复点标记为在下一清理作业中删除,随后会将其删除。If retention is reduced, recovery points are marked for pruning in the next cleanup job, and subsequently deleted.

如何将 Azure 备份备份的 VM 转移到不同的资源组?How do I move a VM backed up by Azure Backup to a different resource group?

  1. 暂时停止备份并保留备份数据。Temporarily stop the backup and retain backup data.

  2. 若要移动配置了 Azure 备份的虚拟机,请执行以下步骤:To move virtual machines configured with Azure Backup, do the following steps:

    1. 找到虚拟机的位置。Find the location of your virtual machine.
    2. 找到包含以下命名模式的资源组:AzureBackupRG_<location of your VM>_1Find a resource group with the following naming pattern: AzureBackupRG_<location of your VM>_1. 例如,AzureBackupRG_chinanorth2_1For example, AzureBackupRG_chinanorth2_1
    3. 在 Azure 门户中,查看“显示隐藏的类型”。In the Azure portal, check Show hidden types.
    4. 查找类型为 Microsoft.Compute/restorePointCollections 的资源,其命名模式为 AzureBackup_<name of your VM that you're trying to move>_###########Find the resource with type Microsoft.Compute/restorePointCollections that has the naming pattern AzureBackup_<name of your VM that you're trying to move>_###########.
    5. 删除此资源。Delete this resource. 此操作仅删除即时恢复点,不删除保管库中的备份数据。This operation deletes only the instant recovery points, not the backed-up data in the vault.
    6. 删除操作完成后,可以移动虚拟机。After the delete operation is complete, you can move your virtual machine.
  3. 将 VM 移到目标资源组。Move the VM to the target resource group.

  4. 恢复备份。Resume the backup.

可以从执行移动操作之前创建的可用还原点还原 VM。You can restore the VM from available restore points that were created before the move operation.

将 VM 移到其他资源组后会出现什么情况?What happens after I move a VM to a different resource group?

将 VM 移到其他资源组后,就 Azure 备份而言,它是一个新的 VM。Once a VM is moved to a different resource group, it's a new VM as far as Azure Backup is concerned.

将 VM 移到新的资源组后,可以在同一保管库或其他保管库中重新保护 VM。After moving the VM to a new resource group, you can reprotect the VM either in the same vault or a different vault. 由于这对 Azure 备份而言是新 VM,因此将单独对其计费。Since this is a new VM for Azure Backup, you'll be billed for it separately.

如果需要,旧 VM 的还原点将可用于还原。The old VM's restore points will be available for restore if needed. 如果不需要此备份数据,则可以停止保护具有删除数据的旧 VM。If you don't need this backup data, you can stop protecting your old VM with delete data.

对于可与同一备份策略关联的 VM 数是否有限制?Is there a limit on number of VMs that can be associated with the same backup policy?

有,可以从门户关联到同一备份策略的 VM 数量限制为 100 个。Yes, there's a limit of 100 VMs that can be associated to the same backup policy from the portal. 我们建议,如果 VM 数超过 100 个,请创建具有相同计划或不同计划的多个备份策略。We recommend that for more than 100 VMs, create multiple backup policies with same schedule or different schedule.

如何查看备份的保留设置?How can I view the retention settings for my backups?

目前,你可根据分配给 VM 的备份策略来查看备份项 (VM) 级别的保留设置。Currently, you can view retention settings at a backup item (VM) level based on the backup policy that's assigned to the VM.

要查看备份的保留设置,一种方法是在 Azure 门户中导航到 VM 的备份项仪表板One way to view the retention settings for your backups, is to navigate to the backup item dashboard for your VM, in the Azure portal. 选择指向其备份策略的链接有助于查看与 VM 关联的全部每日、每周、每月和每年保留点的保留期。Selecting the link to its backup policy helps you view the retention duration of all the daily, weekly, monthly and yearly retention points associated with the VM.

还可使用备份资源管理器在单一管理平台查看所有 VM 的保留设置。You can also use Backup Explorer to view the retention settings for all your VMs within a single pane of glass. 从任何恢复服务保管库中导航到备份资源管理器,转到“备份项”选项卡,然后选择“高级视图”,查看每个 VM 的详细保留信息。Navigate to Backup Explorer from any Recovery Services vault, go to the Backup Items tab and select the Advanced View to see detailed retention information for each VM.