Skip to Content

I have been receiving regular questions on guidelines for backup and restore of SAP HANA and from the questions it seems many customers follow old guidelines for file based backup, especially when using ‘alter system reclaim log’. With SAP HANA SPS5, in addition to the existing file based backup there is a new option to use certified 3rd party tools using the new BACKINT API (see SAP Note 1730932). Guidelines for BACKINT based backup and restore using certified 3rd party tools as introduced with SPS5 will be provided by the 3rd party tool vendor. This blog assumes you have read and understood the SAP HANA Backup & Restore documentation. Please note that with SAP HANA SPS5 the Backup & Restore guide was merged into the SAP HANA administration guide: http://help.sap.com/hana/hana_admin_en.pdf.

After discussions with SAP HANA Development and Product Management in Berlin we agreed on the guidelines below for file based backup. In SAP HANA there are four main basepath parameters which you find in the ‘configuration’ tab in SAP HANA Studio:

  • Basepath_databackup -> for space management the recommendation is to point it to an external mount point. As an alternative, back it up to a local disk with sufficient space and move the databackups to the external mount point (performance of the backup will be faster than to an external mount point)
  • Basepath_datavolumes -> permanent location for data volumes, never delete any datavolume files on OS.
  • Basepath_logbackup -> automatically copies of log segment every 15 minutes or if log segment segment is full, so a lot of files get created quickly. Two important items, first point it to an external mount point. Second, use the script attached to the note at the end of this blog to identify which log backup files you can delete.
  • Basepath_logvolumes -> permanent location for log volumes, never delete any logvolume files on OS. Optionally use “ALTER SYSTEM RECLAIM LOG” is for cleaning up this directory.

“ALTER SYSTEM RECLAIM LOG” before and after SAP HANA SPS3:

Before SAP HANA SPS3 it was recommended to run this command manually after every backup to ensure disk space was reclaimed. The command physically removes the log segments that are no longer needed. With SPS3 log backup functionality was introduced which automates log segment reuse and can eliminate the need to run “ALTER SYSTEM RECLAIM LOG”.

In most SAP HANA instances, especially productive systems, the log_mode is set to ‘normal’ and enable_auto_log_backup set to ‘yes’. This means that log backups are created automatically when a log segment is full or a log segment is closed after exceeding the configured time threshold. The log backup allows the log segment to be reused for new log entries, which eliminates the need to run “ALTER SYSTEM RECLAIM LOG” under normal circumstances. So after SAP HANA SPS3 “ALTER SYSTEM RECLAIM LOG” should only be used in exceptional situations, for example if there is a problem with writing the log backup and you get an alert the log volume disk/path is close to full.

This note can be helpful to schedule backups: https://service.sap.com/sap/support/notes/1651055 – if you read the attachment to the note it gives you an option to identify which log backups can be to deleted.

As always, feedback is welcome!

Serge Muts

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply