Recover the database to its most recent state
Recover the database to the following point in time
Recover the database to a specific data (snapshot) backup
Appendix - SAP HANA Data Volume locations
This article is for the SAP HANA on Azure Large Instances using the Microsoft AzAcSnap version 4.2 or later.
Phil Jensen, Principal Software Engineer at Microsoft.
This article provides guidance on using SAP HANA Studio to recover SAP HANA on Azure Large Instances. This article has step-by-step screenshots to follow to understand the three primary methods of recovering SAP HANA using HANA Studio from a snapshot taken using the Microsoft provided snapshot tools.
The screenshots in this document are from SAP HANA Studio session accessing SAP HANA 2.0SPS04. Be aware that user interfaces may vary, dependent on the specific SAP HANA release.
Disclaimer: This article and the associated screenshots are taken from an SAP HANA v2.0 system recovery as set up in the Microsoft test environment for SAP HANA on Azure Large Instance. Anyone following this guide is responsible for ensuring the recovery process works in their own environment as expected.
The administrator following this artcile has experience with SAP HANA and HANA Studio because not all details are provided as screenshots to follow (e.g. logging in to HANA Studio, etc.).
The administrator is familiar with SAP HANA backup processes, including the Backup Catalog and Storage Snapshots.
The administrator has the appropriate permissions at a Linux shell to copy files as the <sid>adm user into the SAP HANA Data Area.
Terms used in this documentation:
The system layout used for this documentation has a “primary” SID (C31) and another second tenant (C32).
The second tenant (C32) was created using the SQL commands:
The primary data area is under “/hana/data/C31/mnt00001”. Further explanation of the SAP HANA persistent data storage area is in the Appendix.
In this case the goal is to restore the complete system (SYSTEMDB, C31, C32) from a snapshot to the most recent database state, including any log replay.
Note, the recovery wizard can take several seconds to launch (see the following status)
# su - c31adm
> cp -pr /hana/data/C31/mnt00001/.snapshot/hana_hourly.2019-09-15_2100.1/* /hana/data/C31/mnt00001/.
(!) NOTE: Note the message stating “recovering the system database from a storage snapshot invalidates all the tenant databases”. Tenant databases must now be recovered. |
Note, there is no process for C32 running, this tenant still needs to be recovered.
Repeat the steps 14-25 to recover any other tenants. |
In our example, after recovering tenant C32, the process list looks like the following:
A process listing can also be retrieved form the command line when logged in as the <sid>adm user.
> /usr/sap/hostctrl/exe/sapcontrol -nr 00 -function GetProcessList
15.09.2019 23:51:43
GetProcessList
OK
name, description, dispstatus, textstatus, starttime, elapsedtime, pid
hdbdaemon, HDB Daemon, GREEN, Running, 2019 09 15 23:08:57, 0:42:46, 28998
hdbcompileserver, HDB Compileserver, GREEN, Running, 2019 09 15 23:09:28, 0:42:15, 29598
hdbindexserver, HDB Indexserver-C31, GREEN, Running, 2019 09 15 23:21:34, 0:30:09, 31935
hdbindexserver, HDB Indexserver-C32, GREEN, Running, 2019 09 15 23:37:51, 0:13:52, 36538
hdbnameserver, HDB Nameserver, GREEN, Running, 2019 09 15 23:08:57, 0:42:46, 29017
hdbpreprocessor, HDB Preprocessor, GREEN, Running, 2019 09 15 23:09:28, 0:42:15, 29601
hdbwebdispatcher, HDB Web Dispatcher, GREEN, Running, 2019 09 15 23:09:29, 0:42:14, 29648
hdbxsengine, HDB XSEngine-C31, GREEN, Running, 2019 09 15 23:21:53, 0:29:50, 32071
This process allows recovery of the database to a specific point in time, perhaps just prior to an invalid transaction.
When this is finished, the Processes tab should display as follows:
Note, the recovery wizard can take several seconds to launch (see the following status):
(!) NOTE: The time used is based on UTC/GMT. |
su – c31adm
> cp -pr /hana/data/C31/mnt00001/.snapshot/hana_hourly.2019-09-15_2100.2/* /hana/data/C31/mnt00001/.
(!) NOTE: Note the message stating “recovering the system database from a storage snapshot invalidates all the tenant databases”. Tenant databases must now be recovered. |
(!) NOTE: The time used is based on UTC/GMT. |
Note, there is no process for C32 running, this tenant still needs to be recovered.
Repeat the steps 14-25 to recover any other tenants. |
In our example, after recovering tenant C32, the process list looks like the following:
A process listing can also be retrieved form the command line when logged in as the <sid>adm user.
> /usr/sap/hostctrl/exe/sapcontrol -nr 00 -function GetProcessList
15.09.2019 23:51:43
GetProcessList
OK
name, description, dispstatus, textstatus, starttime, elapsedtime, pid
hdbdaemon, HDB Daemon, GREEN, Running, 2019 09 15 23:08:57, 0:42:46, 28998
hdbcompileserver, HDB Compileserver, GREEN, Running, 2019 09 15 23:09:28, 0:42:15, 29598
hdbindexserver, HDB Indexserver-C31, GREEN, Running, 2019 09 15 23:21:34, 0:30:09, 31935
hdbindexserver, HDB Indexserver-C32, GREEN, Running, 2019 09 15 23:37:51, 0:13:52, 36538
hdbnameserver, HDB Nameserver, GREEN, Running, 2019 09 15 23:08:57, 0:42:46, 29017
hdbpreprocessor, HDB Preprocessor, GREEN, Running, 2019 09 15 23:09:28, 0:42:15, 29601
hdbwebdispatcher, HDB Web Dispatcher, GREEN, Running, 2019 09 15 23:09:29, 0:42:14, 29648
hdbxsengine, HDB XSEngine-C31, GREEN, Running, 2019 09 15 23:21:53, 0:29:50, 32071
This process recovers the database to a specific snapshot only (i.e. no log replay).
When this is finished, the Processes tab should display as follows:
Note, the recovery wizard can take several seconds to launch (see the following status):
# su – c31adm
> cp -pr /hana/data/C31/mnt00001/.snapshot/hana_hourly.2019-09-15_2100.2/* /hana/data/C31/mnt00001/.
(!) NOTE: Note the message stating “recovering the system database from a storage snapshot invalidates all the tenant databases”. Tenant databases must now be recovered. |
Note, there is no process for C32 running, this tenant still needs to be recovered.
Repeat the steps 11-20 to recover any other tenants. |
In our example, after recovering tenant C32, the process list looks like the following:
A process listing can also be retrieved form the command line when logged in as the <sid>adm user.
> /usr/sap/hostctrl/exe/sapcontrol -nr 00 -function GetProcessList
15.09.2019 23:51:43
GetProcessList
OK
name, description, dispstatus, textstatus, starttime, elapsedtime, pid
hdbdaemon, HDB Daemon, GREEN, Running, 2019 09 15 23:08:57, 0:42:46, 28998
hdbcompileserver, HDB Compileserver, GREEN, Running, 2019 09 15 23:09:28, 0:42:15, 29598
hdbindexserver, HDB Indexserver-C31, GREEN, Running, 2019 09 15 23:21:34, 0:30:09, 31935
hdbindexserver, HDB Indexserver-C32, GREEN, Running, 2019 09 15 23:37:51, 0:13:52, 36538
hdbnameserver, HDB Nameserver, GREEN, Running, 2019 09 15 23:08:57, 0:42:46, 29017
hdbpreprocessor, HDB Preprocessor, GREEN, Running, 2019 09 15 23:09:28, 0:42:15, 29601
hdbwebdispatcher, HDB Web Dispatcher, GREEN, Running, 2019 09 15 23:09:29, 0:42:14, 29648
hdbxsengine, HDB XSEngine-C31, GREEN, Running, 2019 09 15 23:21:53, 0:29:50, 32071
A detailed explanation of persistent data storage can be found in the “SAP HANA Administration Guide for SAP HANA Platform” - “Persistent Data Storage in the SAP HANA Database” section.
The following diagram is taken from the “Data and Log Volumes” sub-section. This shows the Directory Hierarchy for Persistent Data Storage (System with Multitenant Database Containers) for SAP HANA. Note the separation of System DB and Tenant DB files into logically grouped sub-directories. The volume names of tenant databases have a suffix to represent the database. For example, the indexserver volume for the first tenant database is hdb00002.00002, for the second database hdb00002.000003, and so on. For example, Tenant DB 1 data storage is grouped into both “hdb00002.00003” and “hdb00003.00003” sub-directories for the indexserver and xsengine respectively.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.