SAP HANA
SAP HANA provides native tools to back up 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
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 repository. A huge advantage of using the Backint-API is the availability of multi-channel backups and restores which can increase the overall performance.
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 HANA Cockpit
The diagram below visualized the backup operations:
- SAP HANA database stores the in-memory data into persistence storage
- From the persistence storage, the third-party agent creates backup streams to the third-party backup target.
- Store the backup on third-part backup Storage
File System Backup
File System Backups write all data to files (for example an NFS share that is available for all nodes).
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 HANA Cockpit
- Log backup can be configured to automatically
The diagram below visualized the backup operations:
- SAP HANA database store the in-memory data into persistence storage
- From persistence storage File System Backup store the backup file to external storage
HANA Storage Snapshot
Storage snapshots are the fastest option to safeguard the SAP HANA database without any performance overhead. The SAP HANA database must be online for storage snapshot backup.
The diagram below visualized the backup operations:
- SAP HANA database stores the in-memory data into persistence storage
- 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.
- The storage snapshot is created based on the internal database snapshot
- Confirm the SAP HANA Snapshot
Note The method is not supported on multi-tenant environment
Advantages and Disadvantages
Backint Backup
Advantages | Disadvantages |
---|---|
Integrity checks at block level | Additional network and system load |
Uses present Veeam backup infrastructure | |
Additional backup tool features (e.g. compression, copies) | |
Backups are immediately available for recovery | |
Certified by SAP (Veeam Plug-In for SAP HANA) |
- 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 and system load |
Requires additional storage in production environment | |
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 and system 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.
How the Veeam Plugin for SAP HANA works
Please refer to the How Veeam Plug-In for SAP HANA Works section in the Veeam Help Center to review the process.
How application backups work in Veeam Backup & Replication
Image-level backups can be created agentless (VM-based) or with the Veeam Agent for Linux. To bring the HANA database to a consistent state within the backup image you have to use pre-freeze and post-thaw scripts.
The provided SAP HANA pre/post freeze scripts are available on GitHub and do also support optional transaction log purging.
The backup process is as follows:
- Veeam will start the configurd pre-freeze script on the HANA system.
- The script will prepare the HANA database by requesting a database snapshot. All HANA data is consistently written to disk.
- When the pre-script ran successful, Veeam will snapshot the machine to save that consistent state on disk.
- Veeam starts backing up from the snapshot (read only data)
- Meanwhile the post-thaw script is called to remove the HANA database snapshot from the live system. Logs are purged when configured.
- When all data is moved to the Veeam repositories (backup done) the volume level or hypervisor level snapshot is deleted.
For reading the volume/disks, Veeam will use Change Block Tracking wherever possible. This speeds up incremental backups for even very large databases, when there was only little change.
Verify Configuration of Backint for Veeam Plug-In
When the Plug-In is conigured it creates a soft link in /hana/shared/<SID>/global/hdb/opt
.
To verify the Backint configuration, do the following:
-
Connect to the database using SAP HANA Studio or Cockpit.
-
Go to Backup/Configuration.
-
In the Backint Agent field, make sure that the specified path leads to
/opt/veeam/VeeamPluginforSAPHANA/hdbbackint
.
It is important to emphasize that:
Veeam does not use any Backint parameter files. Leave these fields empty. 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 use Backint to forward all new logs directly to Veeam Backup & Replication Repository. We recommend to back them up via Backint, but please discuss this with your SAP Basis engineer. If you change this, do not forget to save your settings by clicking on the disk symbol (see screenshot above).
References
- BP Guide - General Plug-In Best Practices
- BP Guide - SAP HANA Operational Best Practices
- Veeam Help Center - How the Veeam Plug-In for SAP HANA Works
- Veeam Enterprise Availability for SAP HANA Whitepaper
- SAP HANA Database Backup and Recovery