Skip to main content
Pure Technical Services

Recovering from Data Snapshots with SAP HANA Cockpit

Currently viewing public documentation. Please login to access the full scope of documentation.

SAP HANA Scale Up/Single Node deployment

Step 1. Prepare to Recover System Database (MDC systems only)

Navigate to the SAP HANA Cockpit web interface and ensure that all of the relevant information is available for it to interface with the relevant deployment to be restored. SAP HANA Systems can be started and stopped from the cockpit interface, where the database will need to be stopped before a recovery can proceed.

Ensure SAP Control credentials are entered and that the resource for HANA cockpit is connected to the SystemDB. Then select the relevant resource for restore operations.
clipboard_e0b8ad5b8bd33d1460991ca11b961b36d.png
From SAP HANA cockpit choose the overall database status tile and select “stop system”.
clipboard_ec7d121a815889b5d4d5292cbd320aeff.png
Stop the system using either “softly” or “immediately”.
clipboard_e8043116e7e19fdde13207fc3998705e9.png
Monitor the system processes until all have been shut down.
clipboard_e62d251cf1b58e6aa8b0f619c624f03c2.png
Once all of the system has shut down, select the relevant resource.
clipboard_e9b8e35d3c4593e59601f50e7a10cc05b.png
In the “Database Administration” tile, select “Recover database”.
clipboard_ea8ec0eb2f6495f94825777e3bfd53b32.png
Select the recovery target type.
clipboard_e0e97a985b58e057b00727c3746d6f961.png
Specify the location of the latest backup catalog, only change these values under specialized circumstances.
clipboard_e3eddcb9661287380622386a68cd99060.png
Note the “Backup ID” of the backup to be used and its availability.
clipboard_ec75e7e55227f42ed998f5e1cc2b7682f.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.

Bash command to unmount the data volume at the specified location.
clipboard_e087736068125c588d6fc171ed4b61af8.png
Navigate to the FlashArray web user interface and select “Storage” from the sidebar and then navigate to the “Volumes” section.
clipboard_ed0f53fca4bca770bb356e21f70e7300d.png
Navigate to the block volume on which the relevant hosts HANA data volume is located.
clipboard_e9b3f03efe6b9d2128874ec68b741250d.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_e5204dbcaaac6225b9c0946f689e4edf0.png
Check the snapshot to be restored matches the requirements for this recovery scenario and then confirm the operation by selecting “Restore”.
clipboard_e6d5dac443b9e9cbe2241bbf7f8465d95.png
Return to the SSH connection and remount the volume to the SAP HANA data location. This assumes that the correct values in /etc/fstab are present.
clipboard_ee690f364940af9a516dab0258e7cb0d2.png

Step 1b. Recover the System Database

Select the refresh icon in the top right-hand corner under Backups to be Used to rescan the backup catalog.
clipboard_e5fbe0ff4f801b6637461098e5eaa8525.png
Once the relevant recovery point has been located it should show as “Available”, select “Step 4” to proceed.
clipboard_e7143ff403fdc1be46455ae6612c82f36.png
Select the preferred value for Delta Backups.
clipboard_e0ff47115fd8ee9accc649f93665e8731.png
Specify any alternative backup locations.
clipboard_e67c2dfc363e271f8616c564755de5b5c.png
Specify if the availability of backups should be checked.
clipboard_ebf50398553958ce0dd59a8bab580eda4.png
Specify if the log area should be initialized, doing so invalidates any logs or log backups made after the recovery point.
clipboard_ef877416bb2e2c868332e4ce14bd024dd.png
Review the information for the recovery operation and then select “Start Recovery”.
clipboard_ee75079e7af1d80cf19e41235284e7d26.png
While Restoring the System Database the status can be observed from the same view.
clipboard_ee9f9a06b317ca181287cf69a45eb686a.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.  

Once the System Database has been recovered select “Manage Databases” from the SystemDB database view.
clipboard_e8451ef9d394ea54d2db222f7a6b7e7da.png
All of the tenants will be shown, but in an offline state. In SAP HANA SPS03 and previous releases only a single tenant system can be recovered when using data snapshots.
clipboard_eb4dc9ed672efcfd749cc745e1f5a4b77.png
Highlight the relevant tenant database to be recovered and then select the three dots in the right-hand corner to bring up the context menu, then select “Recover Tenant”.
clipboard_e076c8950112fd421ec2f5bd4cecbd83a.png
Select the recovery target type.
clipboard_e8166709f67a39025a23eca0dac477186.png
Specify the location of the latest backup catalog, only change these values under specialized circumstances.
clipboard_ecf2badc1b16f131fe5349ea476456786.png
The relevant backup to be used will have the status of “Available”, select this and then select “Step 4”.
clipboard_e570c20c0c1fb6eb69107cc0978bbc4e8.png
Specify if Delta Backups are to be used (using data snapshots this value will be ignored).
clipboard_eddac358ba8b35ba3de3868d9092ded6a.png
Specify an Alternative Backup location if any exist.
clipboard_e3391fd4fc8de8906bfe4f922d2f53d3e.png
Specify if the log area must be initialized.
clipboard_ea64caaebbc8ef925c59210ec03bf7c56.png
Review the information for the recovery operation and then select “Start Recovery”.
clipboard_e626eff80f71815e10f9c78e5a006117b.png
Once the tenant has been successfully recovered the status will be shown.
clipboard_e9be767e964ab1be22d72ef18562869a9.png

 

SAP HANA Scale Out/Multi-Node deployment

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

Navigate to the SAP HANA Cockpit web interface and ensure that all of the relevant information is available for it to interface with the relevant deployment to be restored. SAP HANA Systems can be started and stopped from the cockpit interface, where the database will need to be stopped before a recovery can proceed.

Ensure SAP Control credentials are entered and that the resource for HANA cockpit is connected to the SystemDB. Then select the relevant resource for restore operations.
clipboard_ed738b70ac2cfd991abdaa34f92bf539f.png
From SAP HANA cockpit choose the overall database status tile and select “stop system”.
clipboard_e2dcb9bd0f93d7181c07991b7ff9d450f.png
Stop the system using either “softly” or “immediately”.
clipboard_ee4694292c66d5af5a42c55a28cbc0701.png
Monitor the system processes until all have been shut down.
clipboard_e87ff111ec1d3538247707ceb66fadcc1.png
Navigate towards the SystemDB resource page.
clipboard_ecd210da960d45e237a675d41aa9ba5e2.png
In the “Database Administration” tile, select “Recover database”.
clipboard_e901665ce4ca4bc882d6ad80e5f8997f1.png
Select the recovery target type.
clipboard_e708ee5537d3a1dc14553cdd5e40158c4.png
Specify the location of the latest backup catalog, only change these values under specialized circumstances.
clipboard_e0bbbdb85105e7113d92632487425c55e.png
Note the “Backup ID” of the backup to be used and its availability.
clipboard_e1c45989c55c90693dcddcbff71e303da.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 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_ede7865907e2b6a3bd5d186d34611354a.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_e759b0a51fb07481e219383afae8d2290.png
Unmount each persistence data volume from the mount point on each host.

clipboard_e1a3b65d8633d6338397e12770527b290.png

clipboard_ed9b70271c24f6a84926ba1df7677f1f8.png

clipboard_e815380fae061943f894944f66d16ee46.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. Note that "Restore" will overwrite the existing volume with the snapshot. 
clipboard_e513c4eb2f5ab31f2873c17d06446fe08.png
Verify that the volumes have restored correctly.
clipboard_e50e2e72a29a159ec56a1d9cbb167c165.png
Navigate to each volume and check the details match what is required of the SAP HANA scale out system.
clipboard_ee55930df16f3b427d12feac93cd36eaf.png
Check the details for each volume required to attach to any host in the distributed host setup.

clipboard_e62a5902889bcb26d18fdb0c290c66b7e.png

clipboard_ed22a39c13ddcc06a5d702468a8e85758.png

clipboard_ee29a4433d5f1e2115e4a2d7aab38fa1a.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 world wide ID's in the global.ini configuration file must be first updated. 

As the root user, get the new world wide 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 the refresh icon in the top right-hand corner under Backups to be Used to rescan the backup catalog.
clipboard_ea3ea5ba472a9d9c38252d6a194ddf938.png
Select the preferred value for Delta Backups.
clipboard_eaa3429314b23a671c08eef28bdd099d6.png
Specify any alternative backup locations.
clipboard_ee247443dda14b0d30a79b223ae447616.png
Specify if the availability of backups should be checked.
clipboard_ed4d3840c214952f1d58ea9d667d117bf.png
Specify if the log area should be initialized, doing so invalidates any logs or log backups made after the recovery point.
clipboard_e8691dd347377d8e398433438a2e2c9be.png
Review the information for the recovery operation and then select “Start Recovery”.
clipboard_ee31aa7c41c77b68606e2da3c12c3aba3.png
While Restoring the System Database the status can be observed from the same view.
clipboard_e88c7346e1be65ba93f1e56ef701a9c2a.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.  

Once the System Database has been recovered select “Manage Databases” from the SystemDB database view. All of the tenants will be shown but in an offline state. In SAP HANA SPS03 and previous releases, only a single tenant system can be recovered.
clipboard_ef690d48a1a0c1f1a596c38193852f1a8.png
Highlight the relevant tenant database to be recovered and then select the three dots in the right-hand corner to bring up the context menu, then select “Recover Tenant”.
clipboard_ee9179ad6ba05c9d06ded9cabe970b3ce.png
Select the recovery target type.
clipboard_e9bb1718970aafe44bab8ada665c3f4c0.png
Specify the location of the latest backup catalog, only change these values under specialized circumstances.
clipboard_e92b7e152c603b7e9667b7019d31dc29c.png
The relevant backup to be used will have the status of “Available”, select this and then select “Step 4”.
clipboard_eab0cf62d0226304f1d3e663cbc4e9775.png
Specify if Delta Backups are to be used.
clipboard_eff1a913a9ed2c7925507263e8c3dab67.png
Specify an Alternative Backup location if any exist.
clipboard_e6647c7ae9da4f2ca8a7cb5ac861598ff.png
Specify if the Availability of Backups must be checked.
clipboard_e8e6101d624050264003d0dbab172f4ad.png
Specify if the log area must be initialized.
clipboard_e20d6bb97e281207cf0139466f65ba6d4.png
Review the information for the recovery operation and then select “Start Recovery”.
clipboard_ec662ef96c7ba2cc83757b1215a3e2cbc.png
Once the tenant has been successfully recovered the status will be shown.
clipboard_ed4ea73b680a943e375b58b5aca9f8819.png