This is an archive version of the document. To get the most up-to-date information, see the current version.

Backing Up Databases Using SQL Commands or Scripts

In this article

    You can use HDBSQL to backup and restore SAP HANA databases using Backint. For details on the HDBSQL backup, see the BACKUP DATA Statement section of the SAP HANA SQL and System Views Reference.

    To backup SAP HANA databases using Backint, do the following:

    1. Log in to SAP HANA HDBSQL as the HDB administrator. Use HDBUSERSTORE to securely store connection details on a client machine.

    sh4adm@linux-q0pn:/usr/sap/SH4/HDB01> hdbuserstore SET <key> hostname:30013@SID <username> <password>

    sh4adm@linux-q0pn:/usr/sap/SH4/HDB01> hdbsql -U <key>

    1. Back up the database with Backint, using one of the following scripts:
    • Full backup of SYSTEMDB

    backup data using backint ('backup_name_prefix');

    • Differential backup of SYSTEMDB

    backup data differential using backint ('backup_name_prefix');

    • Incremental backup of SYSTEMDB

    backup data incremental using backint ('backup_name_prefix');

    • Full backup of a tenant database

    backup data for <TENANT_DATABASE_NAME> using backint ('backup_name_prefix');

    • Differential backup of a tenant database

    backup data differential for <TENANT_DATABASE_NAME> using backint ('backup_name_prefix');

    • Incremental backup of a tenant database

    backup data incremental for <TENANT_DATABASE_NAME> using backint ('backup_name_prefix');

    • The ASYNCHRONOUS option will run the backup job in the background and will close the current script session. It can be helpful if you monitor SAP HANA backups somewhere else and just want to start the backups with the script.

    backup data for <TENANT_DATABASE_NAME> using backint ('backup_name_prefix') ASYNCHRONOUS;