Script-Controlled Backups in SAP HANA Database: Documentation of A Template Shell Script For Controlling Backup Execution
Script-Controlled Backups in SAP HANA Database: Documentation of A Template Shell Script For Controlling Backup Execution
Database
Documentation of a template shell script for controlling backup execution
Data Backups in SAP HANA Database can be invoked in many different ways. One such way is to
invoke a data backup from the command line of the operating system of the SAP HANA Database
server. For such purposes, the creation of a Linux shell script that controls backup execution is
advisable. This document describes an example script for the Linux bash shell that can trigger the
execution of data and configuration backups of an instance of SAP HANA Database. The script
additionally contains functionalities to assist with (log-) backup housekeeping.
Contents
About this Shell Script ............................................................................................................................. 3
Important note regarding support for the backup script .................................................................... 3
Features ............................................................................................................................................... 3
Changes in Version 04 ......................................................................................................................... 4
Limitations ........................................................................................................................................... 4
Parameterization ..................................................................................................................................... 4
Specifying the configuration file.......................................................................................................... 5
Generic information on script parameterization ................................................................................ 5
Database System Specific Information ................................................................................................ 5
Target directory and output file name for backup .............................................................................. 6
hdbsql and hdbuserstore information ................................................................................................ 7
Log and Statistics Output into log files ................................................................................................ 7
Log and Statistics Gathering in Database Tables ................................................................................. 8
Program Control .................................................................................................................................. 9
Monitoring and Statistics Gathering ..................................................................................................... 10
Monitoring backup execution ........................................................................................................... 10
Text-file based log and statistics output of the backup script .......................................................... 11
Log output ..................................................................................................................................... 11
Statistics output............................................................................................................................. 11
Table based log and statistics output of the backup script ............................................................... 12
Log output ..................................................................................................................................... 12
Statistics output............................................................................................................................. 12
Ini-file customizing ........................................................................................................................ 13
Monitoring query .......................................................................................................................... 14
Running the Script ................................................................................................................................. 16
Command Line Options ..................................................................................................................... 16
Examples for Backup Creation....................................................................................................... 17
Examples for displaying the backup catalog ................................................................................. 18
Return Codes ..................................................................................................................................... 20
Scheduling backups via cron ............................................................................................................. 21
Further Information............................................................................................................................... 21
Creating a database account for running backups ............................................................................ 21
Using hdbuserstore ........................................................................................................................... 21
Other means to run backups ............................................................................................................. 22
Contact .............................................................................................................................................. 22