Skip to main content

SAP HANA

This section provides information to help you configure your SAP HANA database to work with CxLink backup. It also provides information about the backup storage paths and guidelines to help you perform backup and restore operations.

Topics


Where is the configuration file?

After CxLink Backup setup is done, the configuration file is located in the following path:

/hana/shared/$SAPSYSTEMNAME/global/hdb/opt/conf/emory.cfg


As part of any Third-Party Backup Tool configuration, as described in Backup Configuration Parameters in the SAP HANA Administration Guide, before you start using CxLink Backup, you must set the following SAP HANA parameters. These parameters will configure SAP HANA to send the backups to the CxLink Backup agent instead of using a disk storage target.


_14
[backup]
_14
data_backup_parameter_file = /usr/sap/<SID>/SYS/global/hdb/opt/conf/emory.cfg
_14
catalog_backup_parameter_file = /usr/sap/<SID>/SYS/global/hdb/opt/conf/emory.cfg
_14
catalog_backup_using_backint = true
_14
log_backup_parameter_file = /usr/sap/<SID>/SYS/global/hdb/opt/conf/emory.cfg
_14
log_backup_using_backint = true
_14
data_backup_buffer_size = 4096
_14
parallel_data_backup_backint_channels = 8
_14
_14
[communication]
_14
tcp_backlog = 2048
_14
_14
[persistence]
_14
enable_auto_log_backup = yes

tip

For parallel backint channels check SAP Note 2458043 - SAP HANA Multistreaming Backup to Backint does not work for the proper parameters.

Use one of the following methods to configure the parameters:

  1. Open Hana Studio and connect to the SYSTEMDB database.
  2. Select Configuration and Monitoring -> Open Administration
  3. Open to the Configuration tab.
  4. Modify the values in the [global.ini][backup] section.

Backup and restore your database - 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.

Full Backup

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


_10
BACKUP DATA USING BACKINT ('<BACKUP_PREFIX>')

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


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

Differential Backups

Use the following syntax to perform backups for a Tenant database


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

Incremental Backups

Use the following syntax to perform backups for a Tenant database


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

Recover database

  • Recover a Tenant database to a specific point in time:


    _10
    RECOVER DATABASE FOR <TENANT_DB_NAME> UNTIL TIMESTAMP 'YYYY-MM-DD HH:MM:SS' USING CATALOG BACKINT CHECK ACCESS USING BACKINT

  • Recover from a specific backup_id:


    _10
    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

System Copies

CxLink Backup allows you to perform system copies by restoring a backup of a different database into the target database. CxLink Backup 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.


_10
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.


Backup and restore your database - 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.

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.


Where are your backups stored?

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