With SAP HANA 2.0 one of the biggest changes is its multitenancy property. By default, SAP HANA 2.0 will have multitenant database containers (MDC) and it is the only operational mode. In this three-part blog series, I am going to cover in detail how to use FlashArray//m snapshots for doing backup and recovery of SAP HANA 2.0 MDC system with only Single Tenant. This is the current limitation from SAP where only SAP HANA 2.0 MDC system with the single tenant is supported with storage snapshots. The first part is about how to perform backups using storage snapshots using SAP HANA studio.In the second part will cover the recovery of SAP HANA MDC system. In the third part, I will cover how to automate this whole process using the shell scripts.
Pure Storage snapshots are instantaneous and do not depend on the capacity of the volume. Therefore, the entire process of an SAP HANA backup is accelerated. This saves SAP Basis consultants a great deal of time.
SAP HANA 2.0 MDC basically consists of a system database and one or more tenant databases. System database is used for overall system administration activities and tenant databases are self-contained and completely isolated in terms of persistence layer, database catalog, repository, backups, and logs. As mentioned previously storage snapshots will work only for SAP HANA MDC systems with a system database and only one tenant database.
As shown below is an SAP HANA MDC 2.0 system with one system database and one tenant database.
Backup procedure using SAP HANA storage snapshots:
In SAP HANA studio –> go to the system database do the following:
- Go to the SQL console for the system database and run the following
BACKUP DATA FOR FULL SYSTEM CREATE SNAPSHOT
— FOR FULL SYSTEM
This specifies that the create snapshot operation is performed on every database in the current system, including SystemDB and all tenant databases. Omitting FOR FULL SYSTEM performs the operation only on the connected database.
Check the backup catalog now, you should see that database is in prepared state. Capture the backup ID in the backup details section below.
2. Now freeze the file system for Data volume. Here in my case it is XFS file system and using xfs_freeze. As seen below /hana/data/PSD is the mount point for this system’s data volume.
xfs_freeze -f /hana/data/PSD
Make sure the following file “snapshot_databackup_0_1” is created in the main persistence area of the data volume as shown below:
3. Go into Pure Storage GUI and take the snapshot of the data volume as shown below:
Select the data volume in the Volumes section of Storage –> Create a snapshot in the snapshot section. This creates the storage snapshot.
4. Now unfreeze the file system for the data volume.
Here in my case it is XFS file system and using xfs_freeze. As seen below /hana/data/PSD is the mount point for this system’s data volume.
xfs_freeze -u /hana/data/PSD
5. Go to the system database do the following:
- Go to the SQL console for the system database and run the following. This will update the backup catalog with this successful backup id.
BACKUP DATA FOR FULL SYSTEM CLOSE SNAPSHOT BACKUP_ID 1516141675109 SUCCESSFUL ‘use this’
This confirms that a data snapshot has been created and manually made available in a separate storage location. The data snapshot is then removed from the data area.
Check the backup catalog now, you should see that database backup using snapshots was successful.
Now, this backup can be used to recover the SAP HANA database tenants. Recovery of the tenants(system database and one tenant database) will be covered in the next part of this blog series.
Check out FlashBlade