Link

SAP HANA

SAP HANA provides native tools to backup the SAP HANA database. These tools are available for SAP HANA users and backup vendors to use to take SAP HANA backup as per SAP standards.

Veeam provides following options to protect SAP HANA Environment:

  • Virtual Machine running SAP HANA Database – Veeam Agentless Virtual Machine Image Level Backup.
  • Physical Server running SAP HANA Database – Veeam Agent based backup.
  • SAP HANA database Backup with backint - Veeam Plugin for SAP HANA

Backup Options and tools:

SAP HANA provides native tools to backup and restore SAP HANA databases:

  • Backint API
  • File System Backup
  • HANA Snapshot (Storage Snapshot)

Backint API

The Backint method is an API-based method — it’s generally referred to SAP HANA backup using a third-party utility. It enables 3rd party tool vendors to directly connect their backup agents to the SAP HANA database. Backups are transferred via pipe from the SAP HANA database to the 3rd party backup agent, which runs on the SAP HANA database server and then sends the backups to the 3rd party backup server.

3rd party backup tools can be fully integrated with SAP HANA: • Execution of backup and recovery from the SAP HANA cockpit, SAP HANA studio and via SAP HANA SQL commands • Configuration of tool-specific parameters The Backint backup can be configured through these options: • Third-party backup application • Manually at HANA Studio • SQL Script (manual/external) • SAP DB Cockpit (external scheduler) The diagram below visualized the backup operations:

  1. SAP HANA database stores the in-memory data into persistence storage
  2. From the persistence storage, the third-party agent creates backup streams to the third-party backup target.
  3. Store the backup on third-part backup Storage

BackintBackupDiagram

File System Backup

File System Backups protect complete data to a file. Also note that a File System Backup will put a load on the network and it is recommended to use shared backup storage so it can be available to all the nodes of the database.

You must remember to monitor file system fill level during the backup.

The File System Backups can be configured through these options: • Manually at HANA Studio • SQL Script (manual/external scheduler) • SAP DBA Cockpit (external scheduler) • Log backup can be set automatically

The diagram below visualized the backup operations:

  1. SAP HANA database store the in-memory data into persistence storage
  2. From persistence storage File System Backup store the backup file to external storage

FileBackupHana

HANA Storage Snapshot

Storage snapshots are the fastest option to safeguard the SAP HANA database without any performance overhead and impact The SAP HANA database must be online for storage snapshot backup. The diagram below visualized the backup operations:

  1. SAP HANA database stores the in-memory data into persistence storage
  2. Prepare for a storage snapshot by initiating the SAP HANA Snapshot. During this process, the internal database snapshot is created, and reflects a consistent database state at the point in time it is created in the file system.
  3. The storage snapshot is created based on the internal database snapshot
  4. Confirm the SAP HANA Snapshot

Note The method is not supported on multi-tenant environment

HANAStorageSnap

Advantages and Disadvantages

Backint Backup

Backint Advantages

File System Backup

File Backup

Storage Snapshot

StorageSnapShot

Veeam SAP HANA Backup & Restore

In this section we will focus on the options Veeam provides to protect SAP HANA databases.

We will discuss the following Veeam products that protect SAP HANA environments:

VeeamBackupOPtion

Veeam Plugin for SAP HANA

Veeam Plugin for SAP HANA is part of Veeam Backup & Replication Enterprise Plus Edition offers a full set of SAP HANA database protection:

• Certified SAP HANA Backint processing with the Veeam Plug-in for SAP HANA to protect the database directly: Database backup and restore.

• Protection of the SAP HANA server, HANA installation, and SAP HANA INI files with image-level or file-level functionality of Veeam Backup & Replication or Veeam Agent for Linux. Also, these backup methods offer options like SAP HANA snapshot scripting and storage snapshots.

Use Veeam Plug-in for SAP HANA, if you want to guarantee the integrity of SAP HANA databases in your backups.

Veeam Plug-in integrates with SAP HANA’s Backint. Backint is an API that allows third-party backup tools like Veeam to integrate their backup targets into the SAP HANA own backup process.

When you launch a backup with the Backint selection in a SAP HANA client, Veeam Plug-in for SAP HANA will create an application pipeline stream and transfer database files to Veeam backup repository in Veeam’s proprietary format: .VAB (Veeam application backup).

The following diagram will show the backup operations:

  1. HANA starts the backup.

  2. Veeam Plugin for SAP HANA assigned multiple streams to backup target.

  3. Data stores the Veeam backup repository

Plugin Screenshot

Veeam Backup & Replication

Veeam Backup & Replication is the flagship product of Veeam Hyper-Availability Platform. The configuration of virtual environments is very simple as the SAP HANA server should be treated as virtual machine.

Veeam application-aware processing will use SAP HANA’s storage snapshot method to prepare the database with pre/post freeze scripts along with the image-level backup of virtual machine and provide an option to purge the transactions logs.

The SAP HANA pre/post freeze scripts are available here:

https://github.com/VeeamHub/applications/tree/master/Freeze-Thaw%20Examples/sap-hana

The following diagram shows the backup operations:

  1. Veeam Backup executes application-aware processing HANA pre-freeze script to prepare the internal snapshot of the SAP HANA database.

  2. Preparation of the snapshot.

  3. The data will be synchronized, the points of the transaction logs and internal SAP HANA backup catalogue will be updated to confirm the snapshot.

  4. Veeam Backup Server will create a virtual machine snapshot.

  5. Veeam Backup Server executes application-aware processing HANA post-freeze script.

  6. Removal of HANA Snapshot to close the snapshot.

  7. Optionally, purge the transactions logs.

  8. Veeam data movers transfer the data to Veeam repository

Veeam Agent for Linux

The configuration with Veeam Agent for Linux to configure a SAP HAN physical environment is very simple. In the same way as Veeam Backup & Replication virtual machine backup, it’s possible to take image-level backup of physical servers with integration of SAP HANA via scripts.

Veeam Agent for Linux will use the backup method via HANA Snapshot to prepare the data on the disk made with scripts. As is known, Veeam Agent for Linux will perform the full backup (image) of the physical server.

The following diagram shows the backup operations:

  1. Starting the backup with Veeam Agent for Linux through the agent will execute the script “hana-pre-freeze.sh” to prepare the internal snapshot of the SAP HANA database

  2. Snapshot the HANA to PREPARE the database for the backup.

  3. The data will be synchronized, and the pointers of the transaction logs and the internal SAP HANA backup catalog will be updated to confirm the snapshot via CONFIRM.
  4. Creation of snapshot of physical machine of the operative system.

  5. Veeam Agent for Linux will execute the script “hana-post-thaw.sh”

  6. Remove the HANA Snapshot.

  7. If required and configured, you can purge the transaction logs as well.

  8. Data transfer using “Change Block Tracking” to the Veeam repository

Veeam SAP HANA scripts

There are two script files to take a HANA storage snapshot backup of SAP HANA. Each script is responsible for the certain tasks as explained in the earlier section. There are additional configuration option available in the script to configure the parameters — if required, please read the instructions in the script

Installing Veeam Plug-in for SAP HANA Veeam Plug-in for SAP HANA comes with the Veeam Backup & Replication installation package. If you deploy Veeam backup infrastructure for the first time, you can download Veeam Backup & Replication at: https://www.veeam.com/ backup-replication-vcp-download.html To install Veeam Plug-in, do the following:

  1. Mount the Veeam Backup & Replication installation ISO file.
  2. Go to the mounted ISO and copy the .rpm file from /Plugins/SAP HANA/x64 to the SAP HANA server.
  3. Run the following command to install the plug-in: sudo rpm -i VeeamPluginforSAPHANA-9.5.4.2611.x86_64.rpm

Note If you have scale-out cluster install the plugin on all cluster members

Configuring Veeam Plug-in for SAP HANA

The configuration of Veeam Plug-in for SAP HANA includes configuring integration settings between SAP HANA, Veeam backup server and a backup repository where the backup files will be stored. Veeam Plug-in uses SapBackintConfigTool to configure the integration settings. The wizard configures the SAP HANA Backint settings and creates the /opt/veeam/VeeamPluginforSAPHANA/veeam_config.xml file.

To configure Veeam Plug-in for SAP HANA, do the following:

  1. Launch the configuration tool with a user with database admin rights. Sudo rights are not needed if you have configured group access as described in the Required Permissions section. >sudo SapBackintConfigTool –wizard

  2. Specify the Veeam Backup & Replication server (DNS name or IP address). >Enter backup server name or IP address: serv02.tech.local

  3. Specify the port which will be used to communicate with the backup server. Default port: 10006. >Enter backup server port number: 10006

  4. Specify credentials to authenticate with the Veeam Backup & Replication server.

    >Enter username: serv02\administrator
    >Enter password for serv02\administrator
    
  5. Select the backup repository where you want to store the backup files. In the terminal dialog, you must enter the number of the repository from the list of available repositories.

If you start the wizard for the first time on a SAP HANA scale-out cluster, the wizard will ask you for a cluster name that will be used within Veeam Backup & Replication user to identify the backup job for the cluster. Additional wizard runs within the SAP HANA scale-out cluster will not ask for this entry again.

Setting Permissions for Configuration File

The configuration of Veeam Plug-in for SAP HANA includes the configuration or creation of the SAP HANA Backint symlinks on all SAP HANA instances. To be able to do this for multiple SAP HANA instances at the same time, the configuration must be performed with sudo rights. Alternatively, you can use a member of the sapsys user group to configure the plug-in and set the symlink for SAP HANA instances where the user has access rights. You can repeat the wizard under another user to configure additional SAP HANA instances.

Alternatively, you can configure a Linux security group. You must add all Veeam Plug-in admins to this security group and set the following rights: >sudo chown root: /opt/veeam/VeeamPluginforSAPHANA/veeam_config.xml >sudo chmod 664 /opt/veeam/VeeamPluginforSAPHANA/veeam_config.xml

Verifying Configuration of Veeam Plug-in for SAP HANA

When you finish the plug-in configuration wizard, the plug-in creates a soft link in /hana/shared//global/hdb/opt.

To verify the Backint configuration, do the following:

  1. Connect to the database using SAP HANA Studio or Cockpit.

  2. Go to Backup/Configuration.

  3. In the Backint Agent field, make sure that the specified path leads to /opt/VeeamPluginforSAPHANA/hdbbackint.

BackInt4

It is important to emphasize that:

Veeam does not use any Backint Parameter files. Leave these fields empty, or if you were running something else before, delete the entries.

Log Backup Settings: This allows you to have the logs either on your filesystem or also use Backint to forward all new logs directly to Veeam Backup & Replication. We recommend to back them up via Backint, but please discuss this with your SAP Basis buddy. If you change this, do not forget to save your settings by clicking on the disk symbol.

Backint3

Additional configuration items in SAP HANA

For SAP HANA backint, most configuration items reside in a database configuration file called global.ini. Inside it is a backup section.

Backint1

any of these parameters are self-explanatory but you may consult the SAP HANA Administration Guide, if needed.

Which ones are important for Veeam Backups?

Catalog_backup_using_backint — This determines if the catalog backup will be written to a local disk or to the Veeam repository. There are advantages and disadvantages with each but changing the value to true allows the catalog backup to also write to Veeam repositories instead of local disk.

Parallel_data_backup_backint_channels — This determines how many channels will be used to write the data to a Veeam repository. The HANA service must be greater than 128 GB of data (not RAM) to use parallel channels. The maximum number of channels is 32, but I would encourage you to be cautious. The axiom I often suggest is to use as much as needed for performance and as low as possible for resources used. A recommended approach would be to start with as few as two or as many as four and double it per run to gauge the impact on the total time needed for the backup to run. You should expect to see the time for the backup to complete change in a linear fashion. If not, you may be leveraging too many channels, consuming significant and valuable resources on the HANA instance and the Veeam repository. This can impact overall backint performance, which I will comment on later in this blog.

Do not forget to adjust the data_backup_buffer_size according to your channels. Please consult the SAP HANA admin guide for more information.

Other parameters should be set based upon guidance from SAP and/or Veeam support, as they are dependent upon specific elements within your environment and architecture. For example, larger systems may require you to change the backint_response_timout parameter to a higher value, possibly in conjunction with the log_backup_interval_mode. Both parameters influence how log backups are written into backint.

Performance of Veeam Plug-in for SAP HANA

If you need to evaluate the maximum throughput value your infrastructure can deliver or better understand any bottlenecks, you can simply test your infrastructure without using any Veeam components. To do this you need to mount your CIFS or NFS repository share. It is important is to use the uid or gid to have write access for the adm. mount -t cifs -o username=username, domain=domain, vers=3.0, rw, uid=adm //server/cifsshare /mnt/cifs/ As a result, SAP HANA will provide you a runtime length for your backup and after performance optimization, SAP HANA backing usually yields a more desirable value.


Referenes

Veeam Enterprise Availability for SAP HANA Whitepaper