Skip to Content
Author's profile photo SAP HANA Academy

SAP HANA Academy: Backup and Recovery – Backup Configuration Files

The SAP HANA Academy has published a new video in the series SAP HANA SPS 7 Backup and Recovery.

Backup and Recovery – Backup Configuration Files | SAP HANA

In this video you can view how to generate the ALTER SYSTEM ALTER CONFIGURATION statement for changed parameters.

The SQL file is attached to this document.



select 'ALTER SYSTEM ALTER CONFIGURATION  ('''|| file_name ||''', '''||
        case layer_name
            when 'SYSTEM' then layer_name
            when 'HOST' then layer_name ||''', '''|| host
        end ||
        ''') SET ('''|| section ||''', '''|| key ||''') = '''||value ||''' WITH RECONFIGURE;'
        as "Configuration File Backup"
  from m_inifile_contents
where layer_name != 'DEFAULT'

We also show a simple sample backup script that copies HOST and SID configuration files.

The file is attached to this document.

# Simple sample backup script
# SAP HANA Academy
# Twitter: @saphanaacademy
# define backup prefix
TIMESTAMP="$(date +\%F\_%H\%M)"
# source HANA environment
. /usr/sap/shared/DB1/HDB01/
# execute command with user key
# asynchronous runs job in background and returns prompt
hdbsql -U backup "backup data using file ('$BACKUP_PREFIX') ASYNCHRONOUS"
# create backup directory
# copy host configuration files
# copy system configuration files
SYS_INI_DIR="$(dirname "$SYS_INI_DIR")"
cp $SYS_INI_DIR/hdbconfiguration_* $SYS_BACKUP_DIR

Finally, we briefly discuss the SAP HANA hdbparam tool, which – for as far as I know – has not yet been documented.


SAP HANA Academy

Denys van Kempen

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Kartik Natarajan
      Kartik Natarajan

      Hi Denys,

      Do we have backup script for c-shell(.csh)

      Author's profile photo Denys van Kempen
      Denys van Kempen

      Hi Kartik,

      Does the script return errors when executed in a C shell? BASH is an superset for C; typically this should work. \



      Author's profile photo Kartik Natarajan
      Kartik Natarajan

      Hi Denys,

      I haven't used the above script, but tried with script attached with SAP note 1651055. It didn't work in my system.



      Author's profile photo Denys van Kempen
      Denys van Kempen

      Hi Kartik,

      I see.

      The note appears to date from the early days of SAP HANA:

      Please note: the script is only intended to demonstrate how backup control could be implemented. The responsibility to implement a backup solution appropriately lies with the implementation team. The script is also not intended to replace other scheduling mechanisms for database backups of SAP HANA Database such as the scheduling calendar of dbacockpit. Support for this script will not be provided via E-Mail or SAP Support tickets. Since its initial release, the script has only been provided by means of a consulting note. If have any questions regarding this script, please make use of the SAP HANA community in SAP Community Network (SCN). Version 4 from November 2014 is the final version of the script. There will not be any further changes.

      Have you studied the script?

      What exactly does not work?

      Why would you want the script for the C-shell?