Register Login

SAP HANA Database Backup & Recovery Interview Question and Answer

Updated May 19, 2018

FAQ SAP HANA Database Backup & Recovery

Where is the detailed information related to SAP HANA backup and recovery available?

You can find further details about backup and recovery in the SAP HANA Administration Guide on help.sap.com/hana_appliance.

Which users are permitted to maintain and recover the back up for the SAP HANA database?

All the users of SQL are required to get access to the system privilege BACKUP ADMIN or BACKUP OPERATOR to be able to perform aback up for the data. For the execution of data backups by utilizing the SAP HANA Studio, the privilege CATALOG READ is also required. The SYSTEM user access for normal database operation is not suggested. Instead, the creation of a dedicated administration users with only the privileges necessary for backup and recovery is suggested.

The entire process of recovery can only be initiated by the operating system user <sid>adm.

Am I required to halt the SAP HANA database for creating backup?

No this is not required. The process of data and log areas can only be supported when the SAP HANA database is online. The systems is available BAU only during the data and log backup.

What the types of SAP HANA backup are available?

The SAP HANA database assists the entire data backups along with the delta data backups. A full data backup refers to the complete data backup or a data snapshot of the SAP HANA data area. A delta data backup entails both the differential and incremental data backups, along with the log backups which is also supported.

What are the preconditions to be checked before I begin the process of data backup?

  • You need to first ensure that all the configured services like the statisticsserve, indexserver, etc are running smoothly.
  • You can check this in the Overview of SAP HANA studio -> Operational State: All Services are started.

How can I work on the SAP HANA data backup?

What you should need to know is that each data backup can be executed smoothly by means of an arbitrary SQL interface such as a hdbsql. SAP HANA database comes with the SAP HANA studio and the web-based SAP HANA cockpit which are known to be the two powerful UIs used for completing this task, along with the DBA cockpit which only comprises of the ABAP stack only which can be also be used.

What happens if a scheduled data backup begins prior to the previous backup is completed?

In such a scenario the first data backup will work as BAU and the second data backup will not commence and an error message will be showed.

What is the difference between the backup procedure in single host and multi-host (scale-out) SAP HANA databases?

There is absolutely no difference between the backup procedure in single host and multi-host (scale-out) SAP HANA databases. All the hosts will be backed up instantaneously

During the process of the data backup, Is the log area also saved?

No the log area is not saved during the process of the data backup. A typical SAP HANA data backup only saves the data area. The log area is inevitably saved to log backups at periodic intervals, after an initial data backup.

Can the log backups and data work parallely?

Yes, both the data work and log backups can work parallel. The log backups can be started automatically and independently of data backups once the auto log backup parameter is set.

What type of data is saved in data and log backups?

The back up is created from the entire data from payload data accumulated from all the server nodes of the SAP HANA database, once the whole data area or log area is backed up. This applies for both the multi host as well as the single-host environments.

The backup data is matched to the content once the backup starts for instance during the starting time of the data backup a system-wide save point is formed which then states all the data which will be a part of the backup. Post this all the open transactions which are put together in the data backup is roll backed with the undo information included in the data backup, in case all of the data backup is recovered without creating any backup logs.

Can I take a backup or recuperate the individual database objects like tables or schemata?

No it is not possible recuperate the individual database objects like tables or schemata. Backup and recovery infers to the whole entire database.

Are third-party backup tools braced?

Yes, third party back up tools are maintained along with the process of backing up the SAP HANA database to files in the file system, you can back up and recover the SAP HANA database using a third-party backup tool that supports the Backint for SAP HANA interface.

Third-party backup tools communicate with the SAP HANA database through the Backint for SAP HANA interface. Backint for SAP HANA uses pipes to back up the content of the database and performs all the actions needed to write the backup data to external storage.

Note that backup tools using Backint for SAP HANA must be certified by SAP.

With a file-based backup, will i be able to configure the directories where the backups are written?

Yes, you can change the location of file-based data and log backups. For enhanced data safety, it is suggested that you specify a path to an external backup destination. The backup destination should ideally never be on the same file system as the log areas or data. It is advisable that you create the destination directory structures before initiating the backup.

a) Data backup

By default, the data backups are written to the following destination: $DIR_INSTANCE/backup/data.

You can even specify a different destination when you perform the backup. Alternatively, you can change the default backup destination in the Backup section in SAP HANA studio.

To change the default destination for data backups:

1. In SAP HANA Studio, go to Backup.

2. Go to the Configuration tab and choose Data Backup Settings.

3. Specify the new default destination in the Destination field.

4. Save.

Different data backups can be written to different destinations, but all the parts of one particular data backup are written to the same destination.

b) Log backup

the log backups are written to the following destination, by default: $DIR_INSTANCE/backup/log. You can even alter the backup destination in the Backup editor listed in SAP HANA studio.

To change the default destination for log backups:

1. In SAP HANA studio, go to Backup.

2. Go to the Configuration tab and choose Log Backup Settings.

3. Specify the new default destination in the Destination field.

4. Save.

In general changes to the data or log backup destinations take effect immediately.

Does SAP HANA database generally support the file-based backups to NFS-mounted file systems?

Yes.

Backup to a NFS mounted file system is supported.

What are the naming conventions for data backup files?

Each backup name comprises of the elements listed below: <path><prefix>

If a complete path is specified, then the default backup destination is prepended to the backup name. For the file-based backups, all of the backups are written to a destination in the file system. For all the backups made using third-party backup tools, a pipe is created in the file system. The pipe is constantly created in the directory /usr/sap/<SID>/SYS/global/hdb/backint. The backup tool resolves where the backups are actually written.

You can either use the specify a different prefix for the backup name prefix proposed by the system. During backup, each service backs up its respective data to the backup destination, specified.

Listed below is an example of a set of backup files from one data backup which has been created with SAP HANA studio. The backups can have different names.

  • /backup/data/COMPLETE_DATA_BACKUP_databackup_0_1 (name server topology)
  • /backup/data/COMPLETE_DATA_BACKUP_databackup_1_1 (name server)
  • /backup/data/COMPLETE_DATA_BACKUP_databackup_2_1 (for example, index server)...

In the above example, the <path> is /backup/data/, the <prefix> is COMPLETE_DATA_BACKUP. databackup_0_1 is the suffix, which is automatically added by the system.

How can I evaluate the size of a data backup?

For estimating the size of a data backup, you can query the system table M_CONVERER_STATISTICS. The number of currently available blocks are included in the This system table.

For estimating the size of the next complete data backup, you can use either of the following SQL commands:

select sum(allocated_page_size) from M_CONVERTER_STATISTICS

The result is generally a single value which provides you the sum of the sizes of all services in bytes. The size varies slightly between SELECT statement and DATA BACKUP execution.

Where and how can I see a history of all my data and log backups?

The backup catalog essentially provides you with all the information regarding the execution of backups, their history and recoveries. This also permits the system for determining if the recovery is possible and what data ad log backup should you choose to recover the database.

The monitoring views M_BACKUP_CATALOG and M_BACKUP_CATALOG_FILES can be used for displaying all the information related to about the backup catalog. For executing this particular function, you would require the system privilege CATALOG READ.

Is it possible to cancel a running data backup?

Yes, it is possible to cancel a running data backup. When beginning with SAP HANA database revision 28 then you can cancel a data backup which is still running. For cancelling a running data backup, you can use SQL command or SAP HANA studio. However, these can only be used if you have the system privileges CATALOG READ and BACKUP ADMIN. This particular feature is only available from revision 28 onwards.

Are all backups generally compressed?

At present the SAP HANA database does not offer any backup compression. It is interesting to know that all third-party backup tools generally offer backup compression. In case you are using a third-party backup tool, then you need to reach out to you tool vendor to know more about the options offered in compression.


×