SAP HANA keeps data in memory, but it is not volatile in the way that sounds. Every change is written to the log volume, and savepoints regularly persist data pages to the data volume. Backups build on top of that persistence.
The two kinds of backup
Data backups copy the data pages of a database at a point in time. You can take full backups, and also delta backups (incremental or differential) to save time and space.
Log backups copy the contents of the log segments. By default HANA backs up closed log segments automatically, which is what makes point-in-time recovery possible.
A recovery normally needs a data backup plus every log backup taken after it.
Taking a data backup
From SQL (as a user with the BACKUP ADMIN privilege), connected to the system database:
BACKUP DATA FOR <TENANT_SID> USING FILE ('COMPLETE_DATA_BACKUP');
The file prefix is written to the configured backup location (basepath_databackup). Third-party tools use USING BACKINT instead of USING FILE.
Checking the backup catalog
The backup catalog records every backup and is itself backed up with the log backups. To see recent data backups:
SELECT ENTRY_TYPE_NAME, STATE_NAME, SYS_START_TIME, SYS_END_TIME
FROM M_BACKUP_CATALOG
WHERE ENTRY_TYPE_NAME = 'complete data backup'
ORDER BY SYS_START_TIME DESC;
A backup with STATE_NAME = 'failed' deserves a look at backup.log in the trace directory.
Things worth checking regularly
Log mode is
normal, notoverwrite— otherwise there are no log backups and no point-in-time recovery.Log backups are actually running and the log volume is not filling up.
The backup location has free space, and old backups are housekept (but never delete the last full backup needed for recovery).
A recovery has been tested on a non-production system. A backup you have never restored is a hope, not a plan.
Recovery options
HANA Cockpit and HANA Studio both offer recovery wizards. The common choices are:
Recover to the most recent state (data backup + all logs).
Recover to a specific point in time.
Recover to a specific data backup (no logs).
The tenant must be stopped for recovery, and recovery of the system database is done separately from tenant recovery.

Comments (0)
No comments yet. Questions and corrections are welcome.
Leave a comment