Skip to main content
Pure Technical Services

Recovering from Data Snapshots with SAP HANA Studio

The recovery process for a storage snapshot will restore the SAP HANA instance and all of the data to the point in time at which the storage snapshot was taken.

The recovery of a system using storage snapshots with multiple database containers (MDC) is only supported from SAP HANA 2.0 SPS04.  A system with a single container can be recovered from a data snapshot in previous versions.

SAP HANA Scale Up/Single Node deployment

Step 1. Prepare to Recover the System Database (MDC Systems Only)

Navigate to the Systems inventory and right client on the SystemDB connection for the relevant database and navigate to the Backup and Recovery sub-menu then select “Recover System Database…”. A prompt to shut down the relevant system will be shown as recovery can only be done when it is offline.

Navigate to the systems inventory, right click the SystemDB and navigate to Backup and Recovery > Recover System Database...
clipboard_e473d7280fcde31effb977f617a6955cd.png
Enter the relevant values for the <sid>adm user created during initial SAP HANA installation.
clipboard_e6d7849b48e9679798df07cb37ed8b508.png
SAP HANA studio will display a prompt to shut down the system.
clipboard_ed69a468bb04f158bd6083145b52f002b.png
The graphical process offers the user various options of choosing a recovery type.
clipboard_ee7d66bcd5b8b8ec4780cc539b8904483.png
The location of the backup catalog is normally populated, only change the under specialized circumstances where the recovery catalog is in a different location.
clipboard_e79bd5ca722fe19afd5f848448714f805.png
All records in the catalog will be shown with the relevant information, take note of the Backup ID for the required recovery point.
clipboard_eb366374f2b734d7c7aa6db56d702a61f.png

Step 1a. Recover block storage volume

Recover the relevant storage volume using the FlashArray web user interface. This operation can also be completed using the command line interface or ReST API.

The persistence data volume must be unmounted from the operating system before a snapshot is restored. This can be done using the “umount” command in a terminal or SSH connection.
SSH command to unmount the volume at the specified location.
clipboard_e1ad2992372c4f9a57fd42d8cf98087c1.png
Navigate to the FlashArray web user interface and select “Storage” from the sidebar and then navigate to the “Volumes” section.
clipboard_e453bbb22a9a9f3d9d5ff4b6c727c176d.png
Navigate to the block volume on which the relevant hosts HANA data volume is located.
clipboard_e924054ee978f46d6d01aac329dd4ccb0.png

The snapshot which matches the “Backup ID” in the catalog is appended with the exact same value, this is the volume which should be restored. Note that the addition of this value is done during storage snapshot creation by the user.

Select the 3 vertical dots to bring up the context menu and select Restore…
clipboard_e237723c4ff1b2f46a499765b21988a23.png
Check the snapshot to be restored matches the requirements for this recovery scenario and then confirm the operation by selecting “Restore”.
clipboard_e9e203da742dc9b61cde5abc126a92400.png
Return to the SSH connection and remount the volume to the HANA data location. This assumes that the correct values in /etc/fstab are present.
clipboard_eebaebcddd5d4679c31f67bf0d2ab33a3.png

Step 1b. Recover the System Database

Select “Refresh” from the Recovery window in SAP HANA studio and the relevant recovery point should be shown as available, then select “Next “to proceed.
clipboard_e30fb983c0c45553827a3dcaa0c0b2321.png
Review the relevant settings for “Initialize Log Area”, “Use Delta Backups” and “Install New License Key”. In some scenarios, these selections will be grayed out depending on the recovery type.
clipboard_e89461e958e569f4211432f3060ceb347.png
Review all of the recovery settings and proceed by selecting “finish”.
clipboard_eb0d1c028619ef709946b47db6ea8b14f.png

 

Step 2 Recover Tenant Database(s)

During the recovery of the System database all tenant databases are invalidated and need to be individually recovered by repeating the below steps. 

Follow from here if using single container SAP HANA 1.0 system. Notable differences are the absence of “System” and “Tenant” terminology.

In SAP HANA 2.0 SPS04 and onwards repeat these steps for each additional tenant database.

Ensure that Step 1a is completed, while the database is offline, for SAP HANA 1.0 Single tenant systems before proceeding with the below.  

Review all of the recovery settings and proceed by selecting “finish”.Navigate to the main database view in SAP HANA Studio, right click on the relevant database connection, navigate to “Backup and Recovery” and then select “Recover Tenant Database…”. When using a single container SAP HANA 1.0 system this will state “Recover database…”
clipboard_eee463f21b1c332c5be68a3f633e2eb6c.png
(MDC Only) Select the tenant database to restore. In SAP HANA 2.0 SPS03 and previous releases only a single tenant system can be restored.(MDC Only). Select the tenant database to restore. In SAP HANA 2.0 SPS03 and previous releases only a single tenant system can be restored.
clipboard_eeac44a59ac77b8bad5838fc3782b2bc6.png
The location of the backup catalog is normally populated, only change this under specialized circumstances where the recovery catalog is in a different location.
clipboard_eef43c2acb4f8bbb7bb7a783878b4824d.png
Accept the prompt to shut down the database.
clipboard_efa8edb381a2ecbf466ec99c43ed07374.png
The relevant recovery point should be shown as available, then select “Next “to proceed.
clipboard_e4d3b9b0e947f1819ca3a6596fade7deb.png
The log backup location is typically populated with the system default values, only change these values in specialized circumstances.
clipboard_ebbb77763e509abcba9f07e66686cc295.png
Review the relevant settings for “Check the availability of delta and log backups”, “Initialize Log Area”, “Use Delta Backups” and “Install New License Key”. In some scenarios, these selections will be grayed out depending on the recovery type.
clipboard_ef20680b1c9f72e2d9e5ad9441d243782.png
Review all of the recovery settings and proceed by selecting “finish”.
clipboard_e7f456fa52295632d9637a7b301ba353b.png
When recovery is completed the status will be shown.
clipboard_ee90f076417a370fcd1847099d60acd21.png

 

SAP HANA Scale Out/Multi-Node Deployment 

Step 1. Prepare to Recover System Database (MDC Systems Only)

Navigate to the Systems inventory and right client on the SystemDB connection for the relevant database and navigate to the Backup and Recovery sub menu then select “Recover System Database…”. A prompt to shut down the relevant system will be shown as recovery can only be done when it is offline.

Navigate to the systems inventory, right click the SystemDB and navigate to Backup and Recovery > Recover System Database…
clipboard_ebb3b3076745066f681a17e89ab0c514c.png
Enter the relevant values for the <sid>adm user created during the initial SAP HANA installation.
clipboard_e2025cb6710c9ecb3b537a24ebc965335.png
SAP HANA studio will display a prompt to shut down the system.
clipboard_e3bf84fe930126b0f3bb31da2c731b030.png
The graphical process gives the user an option of choosing a recovery type.
clipboard_e3b668f06ccb0c8fe53511fc84b83317b.png
The location of the backup catalog is normally populated, only change this under specialized circumstances where the recovery catalog is in a different location. 
clipboard_e5f3cc72a2b7c64481780f2358f9ae617.png
All records in the catalog will be shown with the relevant information, take note of the Backup ID for the required recovery point.
clipboard_eb7be8cb81c9a0e191f09875b82d9d1ce.png

Step 1a. Recover Block Storage Data Volumes

Recover the relevant storage volume using the FlashArray web user interface. This operation can also be completed using the command line interface or ReST API.

The persistence data volumes must be unmounted from the operating system before a snapshot is restored. This can be done using the “umount” command in a terminal or SSH connection.
In the FlashArray web user interface navigate to “Storage” and select the “Volumes” section.
clipboard_ef135e9f7a1f2e7c183a13888f4344045.png

The snapshot which matches the “Backup ID” in the catalog is appended with the exact same value, this is the volume which should be restored. Note that the addition of this value is done during storage snapshot creation by the user.

Identify the snapshots relevant to the Backup_ID of the recovery point. 
clipboard_e0d715e6ed946989038bba16532379f52.png
Unmount each persistence data volume from the mount point on each host

clipboard_ee2055a261c7e98da45a88292a7babd4f.png

clipboard_e95c77bf50415ad9341422290b4511a9e.png

clipboard_e93cf53ed61ba72388896a9d0dfa6ca63.png

Select the 3 dots on the right-hand side of the relevant snapshot” and select “Restore” for each required block device. A prompt will appear for each snapshot, check the information, and then confirm the restore operation. Using the Copy option will copy the snapshot to a new volume. If copying the snapshot(s) to a new volume then the old data volumes must be disconnected and the new volumes connected to the hosts.
clipboard_eada7e024d097f9ed45764a83eaf8d8b8.png
Verify that the volumes have restored correctly.
clipboard_e1e631ed99a47dcf07c630268cfc67dc3.png
Navigate to each volume and check the details match what is required of the SAP HANA scale out system.
clipboard_e72970f9c2357a19cfc5347ccb3a6e2f3.png
Check the details for each volume required to attach to any host in the distributed host setup.
clipboard_ea7c5f9c6c72baabe4095b2df491b33e9.png
Check the details for each volume required to attach to any host in the distributed host setup.
clipboard_eaf24cb6aa49b3d416d421ef0bacf730d.png
Check the details for each volume required to attach to any host in the distributed host setup.
clipboard_eafcdf4e84e5b47576355857400d9dfeb.png

Updating global.ini with New Volume WWID's if Snapshots are Copied to New Volumes

If the recovery scenario is to copy the volume snapshots to a new volume and export that to the SAP HANA hosts then the worldwide ID's in the global.ini configuration file must be first updated. 

As the root user, get the new worldwide identifiers for the volumes by executing "multipath -ll". The WWID is the alphanumeric string in the red box. Collect this value for all of the new data volumes copied from snapshots. 

clipboard_e3ffc3808557ec49b1ca24aca3b2e9536.png

As the root user edit the following file: /hana/shared/<SID>/global/hdb/custom/config/global.ini.

Look for the [storage section] and update the wwid values where the string is "partition_n_data_wwid".

clipboard_e3f307348a0c4f71371267ba89b291759.png

Step 1b. Recover the System Database

Select “Refresh” once all of the steps in Step 1a are completed and wait for the user interface to refresh. Once the required recovery point is shown to be available select “Next”.
clipboard_ebec9e286e2277e0cfa150774ecdb9194.png
Review the relevant settings for “Initialize Log Area”, “Use Delta Backups” and “Install New License Key”. In some scenarios, these selections will be grayed out depending on the recovery type.
clipboard_ed216833a0cefb41344066d48b865e443.png
Review all of the recovery settings and proceed by selecting “finish”.
clipboard_e59754d338b684970214868cd6d3f0446.png
Monitor the recovery process.
clipboard_ea3409388b706bb404db38046515311ba.png
Verify the system was restored successfully.
clipboard_e43b6772cb8eead219b41aba19d62aa78.png

Step 2. Recover Tenant Database(s)

During the recovery of the System database, all tenant databases are invalidated and need to be individually recovered by repeating the below steps. 

Follow from here if using single container SAP HANA 1.0 system. Notable differences are the absence of “System” and “Tenant” terminology.

In SAP HANA 2.0 SPS04 and onwards repeat these steps for each additional tenant database.

Ensure that Step 1a is completed, while the database is offline, for SAP HANA 1.0 Single tenant systems before proceeding with the below.  

Navigate to the main database view in SAP HANA Studio, right click on the relevant database connection, navigate to “Backup and Recovery” and then select “Recover Tenant Database…”. When using a single container SAP HANA 1.0 system this will simply state “Recover database…”
clipboard_eb37d2660755aec5dee6e9b8703bfe0cf.png
(MDC Only) Select the tenant database to restore. In SAP HANA 2.0 SPS03 and previous releases, only a single tenant system can be restored.
clipboard_e09854b4437dbba9707b1eee6e04370bd.png
Specify the Recovery Type.
clipboard_eb54659dd94d403c6f92206eac1e339c2.png
The location of the backup catalog is normally populated, only change this under specialized circumstances where the recovery catalog is in a different location.
clipboard_eda9e6f375d2c5c6242cb8dbbfde35b6c.png
Accept the prompt to shut down the database.
clipboard_ed368b9a2f25a5524b9a1a0c2b3a006bd.png
The relevant recovery point should be shown as available, then select “Next “to proceed.
clipboard_e81d2f74a7d5386d47e9d0c72fccd24cd.png
Review the relevant settings for “Initialize Log Area”, “Use Delta Backups” and “Install New License Key”. In some scenarios, these selections will be grayed out depending on the recovery type.
clipboard_ee2b7c2045c414c29839bee9382ec1aa2.png
Monitor the data recovery operation.
clipboard_e0b6fecd3ed9d549c5d51dabf05fa32e4.png