HDBSettings.sh Example: Performing SAP HANA DATA Only Restores

Restore the SAP HANA data and discard the log segments by using HDBSettings.sh.

Before You Begin

  1. Create the hbduserstore key.

  2. Log on to the database with the key.

  3. Perform a SAP HANA complete data backup.

  4. Clear the log segments.

Procedure

  • On the command line, type the following command substituting the backup prefix and data file from the backup.

    HDBSettings.sh recoverSys.py --command="RECOVER DATA USING BACKINT ('backup_prefix_COMPLETE_DATA_BACKUP') CLEAR LOG" --wait --timeout=600

Example

Restore the backup with the prefix called '2014_09_16:12:09_COMPLETE_DATA_BACKUP'.
hana02:/usr/sap/TRD> HDBSettings.sh recoverSys.py --command="RECOVER DATA USING BACKINT ('2014_09_16:12:09_COMPLETE_DATA_BACKUP') CLEAR LOG" --wait --timeout=600 [140367615465216, 0.002] >> starting recoverSys (at Wed Sep 17 06:58:25 2014)
 [140367615465216, 0.002] args: ()
 [140367615465216, 0.002] keys: {'command': "RECOVER DATA USING BACKINT ('2014_09_16:12:09_COMPLETE_DATA_BACKUP') CLEAR LOG", 'timeout': '600', 'wait': True}
 own pid: 10317
 recoverSys started: 2014-09-17 06:58:25
 testing master: hana02
 hana02 is master
 shutdown database, timeout is 600
 stop system
 stop system: hana02
 stopping system: 2014-09-17 06:58:25
 stopped system: 2014-09-17 06:58:25
 creating file recoverInstance.sql
 restart database
 restart master nameserver: 2014-09-17 06:58:40
 start system: hana02
 2014-09-17T06:59:35+00:00 P011336 1488267f4b4 INFO RECOVERY state of service: nameserver, hana02:30201, volume: 1, RecoveryExecuteTopologyAndSSFSRecoveryFinished
 2014-09-17T07:03:42+00:00 P011336 1488267f4b4 INFO RECOVERY RECOVER DATA finished successfully
 recoverSys finished successfully: 2014-09-17 07:03:44
 [140367615465216, 318.589] 0
 [140367615465216, 318.589] << ending recoverSys, rc = 0 (RC_TEST_OK), after 318.587 secs

Loading...