关于 Azure 恢复服务 (MARS) 代理About the Azure Recovery Services (MARS) agent

本文介绍 Azure 备份服务如何使用 Azure 恢复服务 (MARS) 代理将本地计算机中的文件、文件夹以及卷或系统状态备份和还原到 Azure。This article describes how the Azure Backup service uses the Azure Recovery Services (MARS) agent to back up and restore files, folders, and the volume or system state from an on-premises computer to Azure.

MARS 代理支持以下备份方案:The MARS agent supports the following backup scenarios:

MARS 备份方案

  • 文件和文件夹:选择性地保护 Windows 文件和文件夹。Files and Folders: Selectively protect Windows files and folders.
  • 卷级别:保护计算机的整个 Windows 卷。Volume Level: Protect an entire Windows volume of your machine.
  • 系统级别:保护整个 Windows 系统状态。System Level: Protect an entire Windows system state.

MARS 代理支持以下还原方案:The MARS agent supports the following restore scenarios:

MARS 恢复方案

  • 同一服务器:最初在其上创建备份的服务器。Same Server: The server on which the backup was originally created.

    • 文件和文件夹:选择要还原的各个文件和文件夹。Files and Folders: Choose the individual files and folders that you want to restore.
    • 卷级别:选择要还原的卷和恢复点,然后将其还原到同一计算机上的同一位置或备用位置。Volume Level: Choose the volume and recovery point that you want to restore and then restore it to the same location or an alternate location on the same machine. 创建现有文件的副本、覆盖现有文件,或跳过现有文件的恢复。Create a copy of existing files, overwrite existing files, or skip recovering existing files.
    • 系统级别:选择要还原到同一计算机上的指定位置的系统状态和恢复点。System Level: Choose the system state and recovery point to restore to the same machine at a specified location.
  • 备用服务器:在其上创建备份的服务器以外的服务器。Alternate Server: A server other than the server where the backup was taken.

    • 文件和文件夹:选择要将其恢复点还原到目标计算机的各个文件和文件夹。Files and Folders: Choose the individual files and folders whose recovery point you want to restore to a target machine.
    • 卷级别:选择要还原到另一位置的卷和恢复点。Volume Level: Choose the volume and recovery point that you want to restore to another location. 创建现有文件的副本、覆盖现有文件,或跳过现有文件的恢复。Create a copy of existing files, overwrite existing files, or skip recovering existing files.
    • 系统级别:选择要作为系统状态文件还原到备用计算机的系统状态和恢复点。System Level: Choose the system state and recovery point to restore as a System State file to an alternate machine.

备份过程Backup process

  1. 在 Azure 门户中创建恢复服务保管库,并从“备份目标”中选择文件、文件夹和系统状态****。From the Azure portal, create a Recovery Services vault, and choose files, folders, and the system state from the Backup goals.

  2. 将恢复服务保管库凭据和代理安装程序下载到本地计算机。Download the Recovery Services vault credentials and agent installer to an on-premises machine.

  3. 安装代理并使用下载的保管库凭据将计算机注册到恢复服务保管库。install the agent and use the downloaded vault credentials to register the machine to the Recovery Services vault.

  4. 从客户端上的代理控制台中,配置备份,指定要备份的内容、何时备份(计划)、备份应在 Azure 中保留多长时间(保留策略)并开始保护。From the agent console on the client, configure the backup to specify what to back up, when to back up (the schedule), how long the backups should be retained in Azure (the retention policy) and start protecting.

Azure 备份代理示意图

其他信息Additional information

  • “初始备份”(首个备份)根据备份设置运行****。The Initial Backup (first backup) runs according to your backup settings. MARS 代理使用 VSS 来创建选择进行备份的卷的时间点快照。The MARS agent uses VSS to take a point-in-time snapshot of the volumes selected for backup. 代理仅使用 Windows 系统写入器操作来捕获快照。The agent only uses the Windows System Writer operation to capture the snapshot. 不使用任何应用程序 VSS 写入器,并且不会捕获应用一致性快照。It doesn't use any application VSS writers, and doesn't capture app-consistent snapshots. 使用 VSS 创建快照后,MARS 代理将在配置备份时指定的缓存文件夹中创建一个虚拟硬盘 (VHD)。After taking the snapshot with VSS, the MARS agent creates a virtual hard disk (VHD) in the cache folder you specified when you configured the backup. 该代理还会存储每个数据块的校验和。The agent also stores checksums for each data block.

  • “增量备份”(后续备份)根据指定的计划运行****。Incremental backups (subsequent backups) run according to the schedule you specify. 在增量备份期间,将会标识已更改的文件,并创建新的 VHD。During incremental backups, changed files are identified and a new VHD is created. 该 VHD 经过压缩和加密,然后发送到保管库。The VHD is compressed and encrypted, and then it's sent to the vault. 增量备份完成后,新 VHD 将与初始复制后创建的 VHD 合并。After the incremental backup finishes, the new VHD is merged with the VHD created after the initial replication. 此合并的 VHD 提供最新状态,用于对现行备份进行比较。This merged VHD provides the latest state to be used for comparison for ongoing backup.

  • MARS 代理可以使用 USN(更新序列号)变更日志在优化模式下运行备份作业,也可以通过扫描整个卷来检查目录或文件的更改,在未优化模式下运行备份作业**** ****。The MARS agent can run the backup job in optimized mode using the USN (Update Sequence Number) change journal, or in unoptimized mode by checking for changes in directories or files via scanning the entire volume. 未优化模式的速度较慢,因为代理必须扫描卷上的每个文件,并与元数据进行比较以确定更改的文件。Unoptimized mode is slower because the agent has to scan each file on the volume and compare it against the metadata to determine the changed files. “初始备份”始终在未优化模式下运行****。The Initial backup will always run in unoptimized mode. 如果上一个备份失败,则下一个计划的备份作业将在未优化模式下运行。If the previous backup failed, then the next scheduled backup job will run in unoptimized mode.

其他方案Additional scenarios

  • 备份 Azure 虚拟机中的特定文件和文件夹:备份 Azure 虚拟机 (VM) 的主要方法是在 VM 上使用 Azure 备份扩展。Back up specific files and folders within Azure virtual machines: The primary method for backing up Azure virtual machines (VMs) is to use an Azure Backup extension on the VM. 该扩展可备份整个 VM。The extension backs up the entire VM. 若要备份 VM 中的特定文件和文件夹,可在 Azure VM 中安装 MARS 代理。If you want to back up specific files and folders within a VM, you can install the MARS agent in the Azure VMs. 有关详细信息,请参阅体系结构:内置 Azure VM 备份For more information, see Architecture: Built-in Azure VM Backup.

  • 脱机种子设定:最初在 Azure 中创建完整数据备份时,通常会传输大量的数据,并会占用更多的网络带宽。Offline seeding: Initial full backups of data to Azure typically transfer large amounts of data and require more network bandwidth. 后续的备份只会传输差异数量(增量)的数据。Subsequent backups transfer only the delta, or incremental, amount of data. Azure 备份可压缩初始备份。Azure Backup compresses the initial backups. 通过脱机种子设定过程,Azure 备份可以使用磁盘将压缩后的初始备份数据脱机上传到 Azure。**Through the process of offline seeding, Azure Backup can use disks to upload the compressed initial backup data offline to Azure.

后续步骤Next steps

MARS 代理支持矩阵MARS agent support matrix

MARS 代理常见问题解答MARS agent FAQ