SAP HANA

Backing Up & Restore #

You can perform your SAP HANA backups by using one of the following options. Select the one that better meet your needs.

Backup and recovery using SQL statements #

The following are examples of SQL statements that you can use to perform backup and recovery. For more details, refer to the SAP, SAP HANA Administration, or SQL Reference guides.

Backup your database #

Full Backups #

Use the following syntax to perform backups on a single-tenant instance or on a multi-tenant SYSTEMDB database.

BACKUP DATA USING BACKINT ('<BACKUP_PREFIX>')

Use the following syntax to perform backups for a Tenant database.

BACKUP DATA FOR <TENANT_DB_NAME> USING BACKINT ('<BACKUP_PREFIX>')

Differential Backups #

Use the following syntax to perform backups for a Tenant database

BACKUP DATA DIFFERENTIAL FOR <TENANT_DB_NAME> USING BACKINT ('<BACKUP_PREFIX>')

Incremental Backups #

Use the following syntax to perform backups for a Tenant database

BACKUP DATA INCREMENTAL FOR <TENANT_DB_NAME> USING BACKINT ('<BACKUP_PREFIX>')

Restore your database #

Use the following syntax to perform a restore for a Tenant database to a specific point in time

RECOVER DATABASE FOR <TENANT_DB_NAME> UNTIL TIMESTAMP 'YYYY-MM-DD HH:MM:SS' USING BACKINT CATALOG CHECK ACCESS USING BACKINT
RECOVER DATA FOR <TENANT_DB_NAME> USING BACKUP_ID 1234567890123 USING CATALOG BACKINT USING DATA PATH ('/usr/sap/<SID>/SYS/global/hdb/backint/DB_<TENANT_DB_NAME>/') CLEAR LOG

The following example shows the syntax to recover your tenant database with a specific data backup without using a catalog.

RECOVER DATA FOR <TENANT_DB_NAME>  USING BACKINT ('<BACKUP_PREFIX>') CLEAR LOG

System Copies #

Emory allows you to perform system copies by restoring a backup of a different database into the target database.

Emory agent should be installed in the target database server and it should be able to access the Amazon S3 bucket where the backups of the source system are stored.

RECOVER DATA FOR <TARGET TENANT_DB>  USING SOURCE '<SOURCE TENANT_DB>@<SOURCE HANA SID>' USING CATALOG BACKINT CLEAR LOG;

If you are performing a system copy across two different AWS accounts, ensure that you have the appropriate IAM permissions and Amazon S3 bucket policies in place. See the Identity and Access Management section in this document for details.

Recover example #
RECOVER DATA FOR LKD USING SOURCE 'LKP@LKP' USING BACKUP_ID 0987654321 USING CATALOG BACKINT CLEAR LOG

Backup and recovery using SAP HANA Studio or Cockpit #

In addition to using SQL statements, you can initiate the backup and recovery process from SAP HANA Cockpit or SAP HANA Studio. For more information, see Backup and Recovery and Reference: Backup Console (SAP HANA Studio) in the SAP documentation. Ensure that you are using the latest version of SAP HANA Cockpit or SAP HANA studio to get all of the latest features from SAP.

Additional Information #

Backup naming convention #

Your backups will be stored in the target bucket following these formatting:

<SAP_SID>/<DB>/<year>/<month>/<day>/<backup_file_name>.<backup_id>

All backup files from the same backup will have the exact same suffix. These can help you to identify the objects of a specific backup.

Example

HDB/SYSTEMDB/2020/05/01/COMPLETE_DATA_BACKUP_databackup_0_1.1589970887300

Scheduling and managing backups #

You can use SAP HANA Cockpit to schedule periodic backups of your target SAP HANA database, including log backups. Ensure that you choose Backint as the backup type when scheduling your backup. For more details, see Schedule Backups in the SAP HANA Administration with SAP HANA Cockpit Guide.

Retention Policies #

Beginning with SAP HANA 2 SPS 03, you can use SAP HANA Cockpit to set the retention policies for your SAP HANA database backups. Based on your retention policies, SAP HANA Cockpit can automatically trigger jobs to delete old backups from catalogs, as well as the physical backups. This process also automatically deletes backup files stored in your Amazon S3 buckets. For more information, see “Retention Policy” under Backup Configuration Settings in the SAP HANA Administration with SAP HANA Cockpit Guide.