使用 Azure 备份服务管理 Azure 恢复服务 (MARS) 代理备份Manage Azure Recovery Services (MARS) Agent backups by using the Azure Backup service

本文介绍如何管理使用 Azure 恢复服务代理备份的文件与文件夹。This article describes how to manage files and folders that are backed up with the Azure Recovery Services Agent.

修改备份策略Modify a backup policy

修改备份策略时,可以添加新项、从备份中删除现有项,或使用“排除设置”来排除文件,使其不会被备份。When you modify backup policy, you can add new items, remove existing items from backup, or exclude files from being backed up using Exclusion Settings.

  • 添加项:此选项仅用于添加要备份的新项。Add Items use this option only for adding new items to back up. 若要删除现有项,请使用“删除项”或“排除设置”选项。 To remove existing items, use Remove Items or Exclusion Settings option.
  • 删除项:使用此选项可以删除项,使其不会被备份。Remove Items use this option to remove items from being backed up.
    • 使用“排除设置”会删除卷中的所有项,此选项的功能与“删除项”不同。 Use Exclusion Settings for removing all items within a volume instead of Remove Items.
    • 清除卷中的所有选择内容会导致系统根据上次备份时的保留设置保留项的旧备份,且这些备份没有可修改的余地。Clearing all selections in a volume causes old backups of the items, to be retained according to retention settings at the time of the last backup, without scope for modification.
    • 重新选择这些项会生成第一个完整备份,且新的策略更改不会应用到旧备份。Reselecting these items, leads to a first full-backup and new policy changes aren't applied to old backups.
    • 取消选择整个卷会保留以前的备份,且保留策略没有任何可修改的余地。Unselecting entire volume retains past backup without any scope for modifying retention policy.
  • 排除设置:使用此选项可以排除特定项,使其不会被备份。Exclusion Settings use this option to exclude specific items from being backed up.

将新项添加到现有策略Add new items to existing policy

  1. 在“操作”中选择“计划备份” 。In Actions, select Schedule Backup.

    计划 Windows Server 备份

  2. 在“选择策略项”选项卡中,选择“修改文件和文件夹的备份计划”并选择“下一步” 。In Select policy item tab, and select Modify backup schedule for your files and folders and select Next.

    选择策略项

  3. 在“修改或停止计划备份”选项卡中,选择“对备份项或时间进行更改”并选择“下一步” 。In Modify or stop schedule backup tab, select Make changes to backup items or times and select Next.

    修改或计划备份

  4. 在“选择要备份的项”选项卡中,选择“添加项”以添加要备份的项 。In Select items to Backup tab, select Add items to add the items that you want to back up.

    修改或计划备份 - 添加项

  5. 在“选择项”窗口中选择要添加的文件或文件夹,然后选择“确定” 。In Select Items window, select files or folders that you want to add and select OK.

    选择项

  6. 完成后续步骤,然后选择“完成”以完成操作。Complete the next steps and select Finish to complete the operation.

将排除规则添加到现有策略Add Exclusion rules to existing policy

可以添加排除规则,以跳过你不想要备份的文件和文件夹。You can add exclusion rules to skip files and folders that you don't want to be backed up. 可以在定义新策略或修改现有策略期间执行此操作。You can do this during when defining a new policy or modifying an existing policy.

  1. 在“操作”窗格中,选择“计划备份”。From the Actions pane, select Schedule Backup. 转到“选择要备份的项”并选择“排除设置” 。Go to Select items to Backup and select Exclusion Settings.

    排除设置

  2. 在“排除设置”中,选择“添加排除项” 。In Exclusion Settings, select Add Exclusion.

    添加排除项

  3. 在“选择要排除的项”中浏览文件和文件夹,选择要排除的项,然后选择“确定” 。From Select Items to Exclude, browse the files and folders and select items that you want to exclude and select OK.

    选择要排除的项

  4. 默认会排除所选文件夹中的所有子文件夹By default all Subfolders within the selected folders are excluded. 可以选择“是”或“否”对此进行更改。 You can change this by selecting Yes or No. 可按如下所示编辑并指定要排除的文件类型:You can edit and specify the file types to exclude as shown below:

    选择子文件夹类型

  5. 完成后续步骤,然后选择“完成”以完成操作。Complete the next steps and select Finish to complete the operation.

从现有策略中删除项Remove items from existing policy

  1. 在“操作”窗格中,选择“计划备份”。From the Actions pane, select Schedule Backup. 转到“选择要备份的项”。Go to Select items to Backup. 在列表中,选择要从备份计划中删除的文件和文件夹,然后选择“删除项”。From the list, select the files and folders that you want to remove from backup schedule and select Remove items.

    选择要删除的项

    备注

    从策略中彻底删除卷时请谨慎。Proceed with caution when you completely remove a volume from the policy. 如果需要再次添加该卷,该卷将被视为新卷。If you need to add it again, then it will be treated as a new volume. 下一次计划备份将执行初始备份(完整备份),而不是增量备份。The next scheduled backup will perform an Initial Backup (full backup) instead of Incremental Backup. 如果以后需要临时删除和添加项,建议使用“排除设置”而不是“删除项”,以确保执行增量备份而不是完整备份 。If you need to temporarily remove and add items later, then it's recommended to use Exclusions Settings instead of Remove Items to ensure incremental backup instead of full backup.

  2. 完成后续步骤,然后选择“完成”以完成操作。Complete the next steps and select Finish to complete the operation.

停止保护文件和文件夹备份Stop protecting Files and Folder backup

可通过两种方式来停止保护文件和文件夹备份:There are two ways to stop protecting Files and Folders backup:

  • 停止保护并保留备份数据Stop protection and retain backup data.
    • 此选项会停止将来所有备份作业的保护。This option will stop all future backup jobs from protection.
    • Azure 备份服务将继续保留所有现有恢复点。Azure Backup service will continue to retain all the existing recovery points.
    • 可以还原尚未过期的恢复点的备份数据。You'll be able to restore the backed-up data for unexpired recovery points.
    • 如果你决定恢复保护,可以使用“重新启用备份计划”选项。If you decide to resume protection, then you can use the Re-enable backup schedule option. 然后,系统会根据新的保留策略保留数据。After that, data will be retained based on the new retention policy.
  • 停止保护并删除备份数据Stop protection and delete backup data.
    • 此选项将使所有将来的备份作业停止保护你的数据,并会删除所有恢复点。This option will stop all future backup jobs from protecting your data and delete all the recovery points.
    • 你将收到一封有关删除备份数据的警报电子邮件,其中包含消息“已删除此备份项的数据。此数据将暂时保留 14 天,此后将永久删除”,以及建议的操作“在 14 天内重新保护备份项以恢复数据”。You'll receive a delete Backup data alert email with a message Your data for this Backup item has been deleted. This data will be temporarily available for 14 days, after which it will be permanently deleted and recommended action Reprotect the Backup item within 14 days to recover your data.
    • 若要恢复保护,请在执行删除操作后的 14 天内重新保护备份项。To resume protection, reprotect within 14 days from delete operation.

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

  1. 打开 MARS 管理控制台,转到“操作”窗格并选择“计划备份”。 Open the MARS management console, go to the Actions pane, and select Schedule Backup.

    选择计划备份

  2. 在“选择策略项”页中,选择“修改文件和文件夹的备份计划”并选择“下一步” 。In the Select Policy Item page, select Modify a backup schedule for your files and folders and select Next.

    选择策略项

  3. 在“修改或停止计划的备份”页中,选择“停止使用此备份计划,但保留存储的备份,直到再次激活计划”。 From the Modify or Stop a Scheduled Backup page, select Stop using this backup schedule, but keep the stored backups until a schedule is activated again. 然后,选择“下一步”。Then, select Next.

    停止计划的备份。

  4. 在“暂停计划的备份”中复查信息,然后选择“完成” 。In Pause Scheduled Backup, review the information and select Finish.

    暂停计划的备份。

  5. 在“修改备份进度”中,检查计划备份暂停是否处于成功状态,然后选择“关闭”以完成操作 。In Modify backup progress, check your schedule backup pause is in success status and select close to finish.

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

  1. 打开 MARS 管理控制台,转到“操作”窗格并选择“计划备份”。 Open the MARS management console, go to the Actions pane, and select Schedule Backup.

  2. 在“修改或停止计划的备份”页中选择“停止使用此备份计划并删除所有存储的备份”选项。 From the Modify or Stop a Scheduled Backup page, select Stop using this backup schedule and delete all the stored backups. 然后,选择“下一步”。Then, select Next.

    修改或停止计划的备份。

  3. 在“停止计划的备份”页中选择“完成”。 From the Stop a Scheduled Backup page, select Finish.

    停止计划的备份并选择完成

  4. 系统会提示输入安全 PIN(个人标识号)。必须手动生成该 PIN。You're prompted to enter a security PIN (personal identification number), which you must generate manually. 为此,请先登录到 Azure 门户。To do this, first sign in to the Azure portal.

  5. 转到“恢复服务保管库” > “设置” > “属性”。Go to Recovery Services vault > Settings > Properties.

  6. 在“安全 PIN”下选择“生成” 。Under Security PIN, select Generate. 复制此 PIN。Copy this PIN. 该 PIN 的有效时间仅为五分钟。The PIN is valid for only five minutes.

  7. 在管理控制台中粘贴该 PIN,然后选择“确定”。In the management console, paste the PIN, and then select OK.

    生成安全 PIN。

  8. “修改备份进度”页中会显示以下消息:“删除的备份数据会保留 14 天。该时间过后,备份数据会被永久删除。”In the Modify Backup Progress page, the following message appears: Deleted backup data will be retained for 14 days. After that time, backup data will be permanently deleted.

    修改备份进度

删除本地备份项后,遵循门户中的后续步骤。After you delete the on-premises backup items, follow the next steps from the portal.

重新启用保护Re-enable protection

如果你在保留数据时停止了保护,后来决定恢复保护,可以使用“修改备份策略”重新启用备份计划。If you stopped protection while retaining data and decided to resume protection, then you can re-enable the backup schedule using modify backup policy.

  1. 在“操作”中选择“计划备份”。 On Actions select Schedule backup.

  2. 选择“重新启用备份计划。也可以修改备份项或时间”,然后选择“下一步”。Select Re-enable backup schedule. You can also modify backup items or times and select Next.

    重新启用备份计划

  3. 在“选择要备份的项”中,选择“下一步” 。In Select Items to Backup, select Next.

    选择要备份的项

  4. 在“指定备份计划”中,指定备份计划并选择“下一步” 。In Specify Backup Schedule, specify the backup schedule and select Next.

  5. 在“选择保留策略”中,指定保留期并选择“下一步” 。In Select Retention Policy, specify retention duration and select Next.

  6. 最后,在“确认”屏幕中,复查策略详细信息并选择“完成” 。Finally in the Confirmation screen, review the policy details and select Finish.

重新生成通行短语Re-generate passphrase

使用 MARS 代理向/从 Azure 备份或还原本地计算机时,通行短语用于加密和解密数据。A passphrase is used to encrypt and decrypt data while backing up or restoring your on-premises or local machine using the MARS agent to or from Azure. 如果丢失或忘记了通行短语,可以通过以下步骤重新生成通行短语(前提是计算机仍注册在恢复服务保管库中,并且已配置备份):If you lost or forgot the passphrase, then you can regenerate the passphrase (provided your machine is still registered with the Recovery Services vault and the backup is configured) by following these steps:

  1. 在 MARS 代理控制台中转到“操作”窗格 > “更改属性”>。 From the MARS agent console, go to Actions Pane > Change properties >. 然后转到“加密”选项卡。Then go to Encryption tab.

  2. 选中“更改通行短语”复选框。Select Change Passphrase checkbox.

  3. 输入新的通行短语,或选择“生成通行短语”。Enter a new passphrase or select Generate Passphrase.

  4. 选择“浏览”以保存新的通行短语。Select Browse to save the new passphrase.

    生成通行短语

  5. 选择“确定”以应用更改。Select OK to apply changes. 如果在 Azure 门户中为恢复服务保管库启用了安全功能,则系统会提示你输入安全 PIN。If the Security Feature is enabled on the Azure portal for the Recovery Services vault, then you'll be prompted to enter the Security PIN. 若要接收该 PIN,请遵循此文中列出的步骤。To receive the PIN, follow the steps listed in this article.

  6. 粘贴门户中的安全 PIN,然后选择“确定”以应用更改。Paste the security PIN from the portal and select OK to apply the changes.

    粘贴安全 PIN

  7. 确保将通行短语安全保存在备用位置(源计算机之外的位置),最好是保存在 Azure Key Vault 中。Ensure that the passphrase is securely saved in an alternate location (other than the source machine), preferably in the Azure Key Vault. 如果正在使用 MARS 代理备份多台计算机,请跟踪所有通行短语。Keep track of all the passphrases if you have multiple machines being backed up with the MARS agents.

管理不可用计算机的备份数据Managing backup data for unavailable machines

本部分讨论以下应用场景:受 MARS 保护的源计算机不再可用,因为它已被删除、损坏、感染了恶意软件/勒索软件或已停止使用。This section discusses a scenario where your source machine that was protected with MARS is no longer available because it was deleted, corrupted, infected with malware/ransomware, or decommissioned.

对于这些计算机,Azure 备份服务会根据备份策略中指定的保留规则,确保最新的恢复点不会过期(即,不会被修剪)。For these machines, the Azure Backup service ensures that the most recent recovery point doesn't expire (that is, doesn't get pruned) according to the retention rules specified in the backup policy. 因此,你可以安全地还原计算机。Therefore, you can safely restore the machine. 请考虑以下可对备份数据执行的方案:Consider the following scenarios you can perform on the backed-up data:

应用场景 1:源计算机不可用,你不再需要保留备份数据Scenario 1: The source machine is unavailable, and you no longer need to retain backup data

  • 可以使用本文列出的步骤从 Azure 门户中删除备份数据。You can delete the backed-up data from the Azure portal using the steps listed in this article.

应用场景 2:源计算机不可用,你需要保留备份数据Scenario 2: The source machine is unavailable, and you need to retain backup data

通过 MARS 控制台而不是门户来管理 MARS 的备份策略。Managing the backup policy for MARS is done through the MARS console and not through the portal. 如果需要在现有恢复点过期之前扩展保留设置,则需要还原计算机、安装 MARS 控制台并扩展策略。If you need to extend retention settings for existing recovery points before they expire, then you need to restore the machine, install the MARS console, and extend the policy.

  • 若要还原计算机,请执行以下步骤:To restore the machine, perform the following steps:
    1. 将 VM 还原到备用目标计算机Restore the VM to an alternate target machine
    2. 使用与源计算机相同的主机名重新创建目标计算机Recreate the target machine with same host name as the source machine
    3. 安装代理,并使用相同的密码重新注册到同一保管库Install the agent and re-register to the same vault and with the same passphrase
    4. 启动 MARS 客户端,以根据要求延长保留期Launch the MARS client to extend the retention duration according to your requirements
  • 最近还原并受 MARS 保护的计算机将继续进行备份。Your newly restored machine, protected with MARS, will continue to take backups.

后续步骤Next steps