SAP HANA Backup Using a Third-party Software

This section describes how to back up SAP HANA deployed on HUAWEI CLOUD using Commvault. When a fault occurs in the SAP HANA system or service migration is required, Commvault can help you quickly and easily restore data from OBS, thereby providing enterprise-level data protection for SAP HANA. For details about Commvault operations, see Commvault Official Documentation.

For details about the third-party backup software that supports the SAP HANA Backint interface, see SAP NOTE 2031547.

SAP HANA Backup Architecture

Figure 1 SAP HANA backup architecture

Figure 1 shows a typical SAP HANA multi-node backup topology. Install iDA for SAP HANA of Commvault on SAP HANA nodes. CommServe (CS), the backup management server, manages backup policies and schedules backup plans. Media Agent (MA), the media agent server, is interconnected with OBS and uploads the deduplicated backup data to the OBS bucket.

For SAP HANA with a large amount of data, Commvault provides Storage Accelerator to improve the backup and restoration performance.

Commvault has the following components:

  • Management server (CommServe)

    CommServe is the central management component of the CommCell environment to coordinate and execute all CommCell operations. It contains a Microsoft SQL Server database that stores all configurations, security attributes, operation history, and Metadata. A CommCell can have only one CommServe that can be installed on a physical machine (PM), virtual machine (VM), or cluster. Table 1 lists the recommended ECS specifications.

    Table 1 Recommended ECS specifications

    Scale

    Client Quantity

    ECS Specifications

    ECS Flavor

    Small

    25 PMs or 100 VMs

    4 vCPUs, 16 GB RAM

    c6.xlarge.4

    Medium

    500 PMs or 1000 VMs

    8 vCPUs, 32 GB RAM

    c6.2xlarge.4

    Large

    2500 PMs or 5000 VMs

    12 vCPUs, 64 GB RAM

    c6.4xlarge.4

    Xlarge

    10,000 PMs or 20,000 VMs

    16 vCPUs, 128 GB RAM

    m3.4xlarge.8

    • Media agent server (MediaAgent)

      MediaAgent is the data transmission manager in the CommCell environment. It provides data storage libraries: disk libraries, tape libraries, and cloud storage. CommServe directs and coordinates MediaAgent to execute tasks. Multiple MediaAgents can be deployed in a CommCell to improve the performance. MediaAgent can be installed on a PM, VM, or cluster and supports Windows, Linux, and Unix operating systems. Table 2 lists the recommended ECS specifications.

      Table 2 Recommended ECS specifications

      Scale

      Client Data Volume

      ECS Specifications

      OBS Capacity

      ECS Flavor

      Xsmall

      5 to 15 TB

      2 vCPUs, 16 GB RAM

      25 TB

      m6.large.8

      Small

      10 to 30 TB

      4 vCPUs, 24 GB RAM

      50 TB

      m6.xlarge.8

      Medium

      30 to 60 TB

      8 vCPUs, 32 GB RAM

      75 TB

      c6.2xlarge.4

      Large

      60 to 125 TB

      12 vCPUs, 64 GB RAM

      150 TB

      c6.4xlarge.4

      Xlarge

      110 to 150 TB

      16 vCPUs, 128 GB RAM

      250 TB

      m6.4xlarge.8

    • Client (iDA)

      A protected and managed production server is a client. Generally, iDA is installed on the client or a proxy server is configured for the client to implement data protection, management, and transmission.

How to Protect SAP HANA Databases from Data Loss

SAP HANA is an in-memory database and stores data in its memory. How to back up the SAP HANA database? To better understand the backup principle of the SAP HANA database, you need to learn about the data protection mechanism of SAP HANA. All data stored in the memory will be lost if the server is powered off. To prevent the data loss, the SAP HANA database periodically stores data to persistent storage (volumes) using the following methods:

  • Savepoint

    SAP HANA periodically initiates a savepoint operation every 5 minutes by default. During a savepoint operation, the data stored in the memory and undo information (including the uncommitted transactions) will be written to the volumes. SAP HANA can be restored to a point in time.

  • Redo

    Database transactions are also recorded in the redo log buffer of the memory. The default size of the redo log buffer is 1 MB. When a transaction is committed or the redo log buffer fills, SAP HANA writes the redo logs in the buffer to a volume. Redo logs can be used to restore the HANA database to a point in time after the savepoint.

SAP HANA persists data in volumes to prevent data loss. However, data is lost and cannot be restored due to volume failure. Data backup from volumes to external storage is required to prevent data loss. Perform the data backup after the savepoint operation to ensure the data consistency between the database and volumes. Currently, the SAP HANA database backup supports online backup, incremental backup, and differential backup. The backup process cannot be interrupted. If an error occurs during the backup process, the backup starts from the beginning.

Redo logs persisted on volumes need to be backed up to external storage. Otherwise, the database will be suspended due to the insufficient space in log storage zone. Figure 2 shows the data backup and log backup.

Figure 2 Data backup and log backup

SAP HANA Database Backup and Restoration Policies

SAP HANA supports full backup, incremental backup, differential backup, and log backup. Backup policies can be orchestrated based on Figure 3.

Figure 3 Backup policy orchestration
  • Full backup

    Full backup is to back up all data on the data volume of the database. It is usually performed on weekends, which exerts little impact on the system.

  • Incremental backup

    Incremental backup is to back up the data that has been changed or created since the previous backup was conducted. It can be performed multiple times in a day, such as in the morning, at noon, or in the evening before settlement.

  • Differential Backup

    Differential backup collects changed data after last full backup, performed after settlement in the evening.

  • Log backup

    The backup of data volumes is performed manually or based on a backup plan whereas log backup is automatically performed every 15 minutes by default. Users can set log backup frequencies based on the site requirements.

    Log backup is of great importance. Logs in volumes need to be backed up. Otherwise, the database will be suspended due to the insufficient space in log storage zone.

    If the version of Commvault is or later than SP16, iDA for SAP HANA backs up the log files in databases to volumes every six hours. Logs of all services can be centrally backed up to reduce the backup times.

You can use backups to restore the SAP HANA database to a certain point in time. The restoration sequence is as follows:

  1. Restore the SAP HANA database to the state of the last full backup.
  2. Restore the SAP HANA database to the state of the last differential backup.
  3. Restore changes made in incremental backup operations since the last full backup.
  4. Restore the changes made in log backup.
    • Restore the SAP HANA database to the latest status. If no log loss occurs, data is not lost.
    • Restore the SAP HANA database to the state at a specified time point. A logical error leads to wrong latest data, therefore, the SAP HANA database should be restored to a certain point in time.

As shown in Figure 4, to restore the SAP HANA database to the latest status, you need to restore it to the state of the last full backup, the latest differential backup (DS), and the latest incremental backup (I4), and then perform a roll-forward operation.

Figure 4 Data restoration

Deduplication Management

As HANA data increases exponentially, enterprises impose higher demand on backup and recovery, leading to higher cost. It is found through research that a maximum of 60% of data stored in SAP HANA is redundant, and as time goes by, there is an increasingly large data redundancy ratio. To save space in a storage system, reduce storage space consumption and costs, and fully use an existing storage space, the data deduplication technology is widely adopted. Data deduplication technology helps improve the utilization of storage space by eliminating duplicate files or data blocks in a storage system, and reduces the volume of data transmitted over the network to lower energy consumption and network costs and save the network bandwidth for data replication.

Commvault integrates source-end and target-end deduplication functions into a unified data management platform. Before backup data is transmitted to servers and storage devices through a network, data on the source-end is deduplicated. Commvault deduplicates data to shorten the backup window, reduce network bandwidth occupation, lower storage costs, and provide reliable data protection.

Commvault employs data block-level deduplication technology and uses SHA 512 (Secure Hash Algorithm, the most secure hash algorithm) to check whether duplicate blocks exist. Commvault provides the content awareness function and it can intelligently split backup/archive data blocks and identify duplicate data blocks in backup/archive data to ensure that only one copy of same data blocks is stored on storage devices.

Data deduplication is managed by MediaAgent. MediaAgent manages three parts:

  • Deduplication database

    The deduplication database is used to compare hash values of data blocks. The performance of the database affects deduplication performance. You are advised to use high I/O disks, for example, ultra-high I/O EVS disks of HUAWEI CLOUD.

  • Backup/archive index

    Backup/archive index records the physical and logical location of data blocks. The index allows you to query the blocks for a certain file and restore data without accessing the deduplication database. You are advised to use high I/O disks, for example, ultra-high I/O EVS disks of HUAWEI CLOUD.

  • Deduplication storage space

    Deduplication data storage is used to store deduplicated physical data blocks. It can be common disks with large capacity, such as OBS, DAS, SAN or NAS storage devices. You are advised to use S3 storage devices, such as OBS of HUAWEI CLOUD.

The deduplication database (DDB) of Commvault is memory database MEMDB (primary database). MemDB provides a better performance, but it is recommended to store MemDB on SSDs or other high I/O disks. A DDB can be configured based on the site requirements. For details, see Table 3.

Table 3 DDB configurations

Scale

Client Data Volume

DDB Capacity

OBS Capacity

Concurrent Streams

Xsmall

5 to 15 TB

200 GB

25 TB

25

Small

10 to 30 TB

400 GB

50 TB

50

Medium

30 to 60 TB

600 GB

75 TB

100

Large

60 to 125 TB

1.2 TB

150 TB

200

Xlarge

110 to 150 TB

2 TB

250 TB

300

Storage Accelerator

The data of clients to be backed up is forwarded by MediaAgent to OBS. Therefore, the client transmits data to MediaAgent, and MediaAgent uploads data to OBS. You can use Storage Accelerator to accelerate the backup process and directly upload data to OBS, as shown in Figure 5.

Storage Accelerator is recommended for the backup of the running SAP HANA. For a large single-node SAP HANA system, Storage Accelerator directly forwards the data streams targeting MediaAgent to OBS. Storage Accelerator provides linear scalability for the multi-node SAP HANA system.

Figure 5 Backup process using Storage Accelerator

Multiple Copy Management

The Commvault platform enables easy management of multiple copies, such as disk-to-cloud-to-cloud (D2C2C) backup and disk-to-cloud-to-tape (D2C2T) backup. Replicate the backup copies to OBS or the tape library in the local data center.

The auxiliary copy (Aux Copy) replicates backup data. That is, data of one copy is replicated to the other for creating multiple copies or DR backup.

Figure 6 Multiple copy replication

Auxiliary Copy enables data replication between different media. The auxiliary copy for a deduplication copy is called DASH Copy, only replicating new data blocks. A storage policy contains three types of copies:

  • Primary

    During backup, data must be written to the primary copy first.

  • Synchronous

    In a synchronous copy, all backup data that is written to the primary copy is copied. An auxiliary copy operation must be performed to replicate the data to the secondary copy.

  • Selective

    A selective copy allows you to copy specific full backup data. An auxiliary copy operation must be performed to replicate the data to the secondary copy.