Link Search Menu Expand Document

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 in a consistent way:

Type Veeam Solution
Virtual Machine running SAP HANA Database Veeam Agentless Virtual Machine Image Level Backup with pre/post scripts
Physical Server running SAP HANA Database Veeam Agent based backup with pre/post scripts
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 as 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

Advantages Disadvantages
Integrity checks at block level Additional network load
Integrated into existing DC infrastructure  
Additional backup tool features (e.g. encryption, de-dup)  
Backups are immediately available for recovery  
  • Backup Size: Payload only
  • Backup Duration: I/O (disk read and write) and network bound

File System Backup

Advantages Disadvantages
Integrity checks at block level Additional network load
  Requires additional storage
  Requires file system fill-monitoring
  Additional time required to make backups available for recovery
  • Backup Size: Payload only
  • Backup Duration: I/O (disk read and write) and network bound

Storage Snapshot

Advantages Disadvantages
Fast No integrity checks at block level
Negligible network load  
Encryption (if data volume encryption is active)  
   
  • Backup Size: Size of data area (but usually compressed or de-duped by storage pool)
  • Backup Duration: Negligible

Veeam SAP HANA Backup & Restore

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

Veeam Plugin for SAP HANA

Veeam Plugin for SAP HANA is part of Veeam Backup & Replication Enterprise Plus Edition and 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

SAP HANA Plugin Overview

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 on GitHub.

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 HANA 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

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: vbr.domain.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: VBR\Administrator Enter password for VBR\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/<SID>/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.

SAP HANA Backint Settings

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 (see screenshot above).


Referenes

Veeam Enterprise Availability for SAP HANA Whitepaper


Back to top

Copyright © 2019-2021 Solutions Architects, Veeam Software.