关于 Azure VM 中的 SAP HANA 数据库备份About SAP HANA database backup in Azure VMs

SAP HANA 数据库是关键工作负荷,要求较低的恢复点目标 (RPO) 和较快的恢复时间目标 (RTO)。SAP HANA databases are mission critical workloads that require a low recovery point objective (RPO) and a fast recovery time objective (RTO). 现在可以使用 Azure 备份备份在 Azure VM 上运行的 SAP HANA 数据库You can now back up SAP HANA databases running on Azure VMs using Azure Backup.

Azure 备份由 SAP 进行了 Backint 认证,通过利用 SAP HANA 的本机 API 提供本机备份支持。Azure Backup is Backint certified by SAP, to provide native backup support by leveraging SAP HANA's native APIs. Azure 备份提供的此产品/服务符合 Azure 备份的零基础结构备份的原则,消除了部署和管理备份基础结构的需求。This offering from Azure Backup aligns with Azure Backup's mantra of zero-infrastructure backups, eliminating the need to deploy and manage backup infrastructure. 现在,你可以无缝地备份和还原在 Azure VM 上运行的 SAP HANA 数据库(现在还支持 M 系列 VM!)并利用 Azure 备份提供的企业管理功能。You can now seamlessly back up and restore SAP HANA databases running on Azure VMs (M series VMs also supported now!) and leverage enterprise management capabilities that Azure Backup provides.

附加价值Added value

使用 Azure 备份来备份和还原 SAP HANA 数据库可以提供以下优势:Using Azure Backup to back up and restore SAP HANA databases, gives the following advantages:

  • 15 分钟恢复点目标 (RPO) :现在可以恢复最多 15 分钟的关键数据。15-minute Recovery Point Objective (RPO): Recovery of critical data of up to 15 minutes is now possible.
  • 一次单击,时间点还原:将生产数据还原到备用 HANA 服务器变得非常简单。One-click, point-in-time restores: Restore of production data to alternate HANA servers is made easy. 用于执行还原的备份和目录的链接全部由 Azure 在幕后进行管理。Chaining of backups and catalogs to perform restores is all managed by Azure behind the scenes.
  • 长期保留:用于满足严格的合规性和审核需求。Long-term retention: For rigorous compliance and audit needs. 基于保留期将你的备份保留多年,超过此时间后,将由内置的生命周期管理功能自动修剪恢复点。Retain your backups for years, based on the retention duration, beyond which the recovery points will be pruned automatically by the built-in lifecycle management capability.
  • Azure 中的备份管理:使用 Azure 备份的管理和监视功能来改进管理体验。Backup Management from Azure: Use Azure Backup's management and monitoring capabilities for improved management experience. 也支持 Azure CLI。Azure CLI is also supported.

若要查看目前支持的备份和还原方案,请参阅 SAP HANA 方案支持矩阵To view the backup and restore scenarios that we support today, refer to the SAP HANA scenario support matrix.

备份体系结构Backup architecture

备份体系结构关系图

  • 备份过程开始时将首先在 Azure 中创建恢复服务保管库The backup process begins by creating a Recovery Services vault in Azure. 此保管库将用来存储随时间推移创建的备份和恢复点。This vault will be used to store the backups and recovery points created over time.

  • 运行 SAP HANA 服务器的 Azure VM 向保管库进行注册,并且将发现要备份的数据库。The Azure VM running SAP HANA server is registered with the vault, and the databases to be backed-up are discovered. 若要使 Azure 备份服务能够发现数据库,必须在 HANA 服务器上以 root 用户身份运行预注册脚本To enable the Azure Backup service to discover databases, a preregistration script must be run on the HANA server as a root user.

  • 此脚本在 hdbuserstore 中创建 AZUREWLBACKUPHANAUSER DB 用户和一个同名的对应键。This script creates AZUREWLBACKUPHANAUSER DB user and a corresponding key with the same name in hdbuserstore. 若要详细了解该脚本的功能,请参阅预注册脚本的功能部分。Refer to the What the pre-registration script does section to understand more about what the script does.

  • Azure 备份服务现在在已注册的 SAP HANA 服务器上安装适用于 HANA 的 Azure 备份插件Azure Backup Service now installs the Azure Backup Plugin for HANA on the registered SAP HANA server.

  • 适用于 HANA 的 Azure 备份插件使用由预注册脚本创建的 AZUREWLBACKUPHANAUSER DB 用户执行所有备份和还原操作。The AZUREWLBACKUPHANAUSER DB user created by the preregistration script is used by the Azure Backup Plugin for HANA to perform all backup and restore operations. 如果你尝试在不运行此脚本的情况下配置 SAP HANA DB 的备份,可能会收到以下错误:UserErrorHanaScriptNotRunIf you attempt to configure backup for SAP HANA DBs without running this script, you might receive the following error: UserErrorHanaScriptNotRun.

  • 若要在发现的数据库上配置备份,请选择所需的备份策略并启用备份。To configure backup on the databases that are discovered, choose the required backup policy and enable backups.

  • 配置备份后,Azure 备份服务将在受保护的 SAP HANA 服务器上在数据库级别设置以下 Backint 参数:Once the backup is configured, Azure Backup service sets up the following Backint parameters at the DATABASE level on the protected SAP HANA server:

    • [catalog_backup_using_backint:true][catalog_backup_using_backint:true]
    • [enable_accumulated_catalog_backup:false][enable_accumulated_catalog_backup:false]
    • [parallel_data_backup_backint_channels:1][parallel_data_backup_backint_channels:1]
    • [log_backup_timeout_s:900)][log_backup_timeout_s:900)]
    • [backint_response_timeout:7200][backint_response_timeout:7200]

备注

确保在主机级别不 存在这些参数。Ensure that these parameters are not present at HOST level. 主机级别的参数将替代这些参数,并可能会导致意外行为。Host-level parameters will override these parameters and might cause unexpected behavior.

  • 适用于 HANA 的 Azure 备份插件维护所有备份计划和策略详细信息。The Azure Backup Plugin for HANA maintains all the backup schedules and policy details. 它触发计划的备份并通过 Backint API 与 HANA 备份引擎进行通信。It triggers the scheduled backups and communicates with the HANA Backup Engine through the Backint APIs.
  • HANA 备份引擎返回 Backint 流以及要备份的数据。The HANA Backup Engine returns a Backint stream with the data to be backed up.
  • 所有计划的备份和按需备份(从 Azure 门户触发的),无论是完整备份还是差异备份,都是由适用于 HANA 的 Azure 备份插件启动的。All the scheduled backups and on-demand backups (triggered from the Azure portal) that are either full or differential are initiated by the Azure Backup Plugin for HANA. 但是,日志备份由 HANA 备份引擎自身进行管理和触发。However, log backups are managed and triggered by HANA Backup Engine itself.
  • 适用于 SAP HANA 的 Azure 备份是一种经过 BackInt 认证的解决方案,不依赖于基础磁盘或 VM 类型。Azure Backup for SAP HANA, being a BackInt certified solution, doesn't depend on underlying disk or VM types. 备份由 HANA 生成的流执行。The backup is performed by streams generated by HANA.

结合使用 Azure VM 备份和 Azure SAP HANA 备份Using Azure VM backup with Azure SAP HANA backup

除了在 Azure 中使用提供数据库级别的备份和恢复的 SAP HANA 备份,还可以使用 Azure VM 备份解决方案备份 OS 和非数据库磁盘。In addition to using the SAP HANA backup in Azure that provides database level backup and recovery, you can use the Azure VM backup solution to back up the OS and non-database disks.

经 Backint 认证的 Azure SAP HANA 备份解决方案可用于数据库备份和恢复。The Backint certified Azure SAP HANA backup solution can be used for database backup and recovery.

Azure VM 备份可用于备份 OS 和其他非数据库磁盘。Azure VM backup can be used to back up the OS and other non-database disks. VM 备份每天进行一次,并备份所有磁盘(写入加速器 (WA) 磁盘和超级磁盘除外 )。The VM backup is taken once every day and it backups up all the disks (except Write Accelerator (WA) disks and ultra disks). 由于要使用 Azure SAP HANA 备份解决方案备份数据库,因此可以使用 Azure VM 选择性磁盘备份和还原功能仅对 OS 和非数据库磁盘进行文件一致性备份。Since the database is being backed up using the Azure SAP HANA backup solution, you can take a file-consistent backup of only the OS and non-database disks using the Selective disk backup and restore for Azure VMs feature.

备注

结合使用预发布脚本与 Azure VM 备份,可以对数据库的数据卷进行应用一致性备份。Using pre-post scripts with the Azure VM backup will allow app-consistent backups of the data volumes of the database. 但如果日志区域位于 WA 磁盘,则拍摄这些磁盘的快照可能无法保证日志区域的一致性。However, if the log area resides on WA disks, taking a snapshot of these disks may not guarantee a log area consistency. 出于此确切的原因,HANA 具有可生成日志备份的显式方法。HANA has an explicit way of generating log backups for this exact reason. 在 SAP HANA 中启用相同的设置,即可使用 Azure SAP HANA 备份对其进行备份。Enable the same in your SAP HANA, and they can be backed up using Azure SAP HANA backup.

若要还原运行 SAP HANA 的 VM,请按照以下步骤操作:To restore a VM running SAP HANA, follow these steps:

  • 从最新的恢复点,从 Azure VM 备份还原新的 VMRestore a new VM from Azure VM backup from the latest recovery point. 或创建新的空 VM 并将磁盘附加到最新恢复点。Or create a new empty VM and attach the disks from the latest recovery point.
  • 由于不备份 WA 磁盘,这些磁盘不会进行还原。Since WA disks aren't backed up, they aren't restored. 创建空的 WA 磁盘和日志区域。Create empty WA disks and log area.
  • 设置所有其他配置(例如 IP、系统名称等)后,将 VM 设置为从 Azure 备份接收 DB 数据。After all the other configurations (such as IP, system name, and so on) are set, the VM is set to receive DB data from Azure Backup.
  • 现在,将 DB 从 Azure SAP HANA DB 备份还原到 VM 中所需的时间点。Now restore the DB into the VM from the Azure SAP HANA DB backup to the desired point-in-time.

后续步骤Next steps