Skip to Content
1
Jan 18, 2021 at 07:05 PM

can hdbrecovercheck.py work on HANA2.0 SPS04 or SPS03 version backups to checkPointInTimeReachable

168 Views

hdbadm@target:/tmp/python_support> hdbbackupdiag -v -d /backup/CATALOG_BKP/ | grep "\Backup time\|\Youngest Commit Time\|\CurrentDestinationPath\|DestinationFileName" | tail -4 Backup time: 2021-01-18T15:36:38+00:00 Youngest Commit Time: 2021-01-18T15:36:24+00:00 CurrentDestinationPath: /backup/LOG_BKP/DB_DB3 DestinationFileName: log_backup_2_0_516352320_516451520.1610984198282 hdbadm@target:/tmp/python_support>

I'm using YCT timestamp got from above command as until timestamp in below command, however, it is failing.

hdbadm@target:/tmp/python_support> python hdbrecovercheck.py checkPointInTimeReachable -c /backup/CATALOG_BKP -D HDB -t "2021-01-18 15:36:24" -l /backup/LOG_BKP -d /backup/DATA_BKP 18.01.2021 18:31:41 INFO: ==== hdbrecovercheck.py started at 2021-01-18 18:31:41 UTC) (local time: 2021-01-18 18:31:41 UTC) ==== 18.01.2021 18:31:41 INFO: Checking backup consistency (untilTime=2021-01-18 15:36:24, backupCatalogPath=/backup/CATALOG_BKP, logBackupPaths=/backup/LOG_BKP, dataBackupPaths=/backup/DATA_BKP, backintVersion=None, useBackintBackupCatalog=False, backintCatalogParamFile=None, backintDataParamFile=None, backintLogParamFile=None, ignoreDeltaDataBackups=False, database=HDB) 18.01.2021 18:31:41 INFO: Calling hdbbackupdiag -v -t -B -u 2021-01-18\ 15:36:24 -d /backup/CATALOG_BKP 18.01.2021 18:31:45 INFO: Calling hdbbackupdiag -v -t -B -u 2021-01-18\ 15:36:24 -d /backup/CATALOG_BKP --check --logDirs /backup/LOG_BKP --dataDir /backup/DATA_BKP No handlers could be found for logger "SAPControlOperations" 18.01.2021 18:32:29 INFO: Successfully checked backup files required for recovery: FULL_databackup_0_1 INCREMENTAL_databackup_incremental_0_1610974716318_0_1 FULL_databackup_2_1 INCREMENTAL_databackup_incremental_1610973620829_1610974716318_2_1 log_backup_2_0_515301952_515403200.1610975198261 log_backup_2_0_515403200_515503744.1610976098263 log_backup_2_0_515503744_515604736.1610976998265 log_backup_2_0_515604736_515726656.1610977898268 log_backup_2_0_515726656_515827136.1610978798270 log_backup_2_0_515827136_515928000.1610979698272 log_backup_2_0_515928000_516028800.1610980598274 log_backup_2_0_516028800_516151552.1610981498276 log_backup_2_0_516151552_516251584.1610982398278 log_backup_2_0_516251584_516352320.1610983298280 log_backup_2_0_516352320_516451520.1610984198282 18.01.2021 18:32:29 ERROR: hdbrecovercheck.py checkPointInTimeReachable got unexpected error - 'YoungestCommitTime' Traceback (most recent call last): File "hdbrecovercheck.py", line 1479, in main database=args.database) File "hdbrecovercheck.py", line 171, in checkPointInTimeReachable backupsPerVolumeId=backupsPerVolumeId) File "hdbrecovercheck.py", line 729, in _checkReachableViaBackup reachableResultPerVolumeId[volumeId] = self._checkReachableViaLogBackupOfVolume(untilTime=untilTime, volumeId=volumeId, backups=backups) File "hdbrecovercheck.py", line 688, in _checkReachableViaLogBackupOfVolume if datetime.strptime(backup["YoungestCommitTime"], '%Y-%m-%d %H:%M:%S') >= datetime.strptime(untilTime, "%Y-%m-%d %H:%M:%S"): KeyError: 'YoungestCommitTime' 18.01.2021 18:32:29 INFO: ==== hdbrecovercheck.py finished at 2021-01-18 18:32:29 UTC) (local time: 2021-01-18 18:32:29 UTC) ==== hdbadm@target:/tmp/python_support>

hdbadm@target:/tmp/python_support> python hdbrecovercheck.py checkBackupConsistency -c /backup/CATALOG_BKP -D HDB -t "2021-01-18 15:36:24" -l /backup/LOG_BKP -d /backup/DATA_BKP 18.01.2021 18:29:27 INFO: ==== hdbrecovercheck.py started at 2021-01-18 18:29:27 UTC) (local time: 2021-01-18 18:29:27 UTC) ==== 18.01.2021 18:29:27 INFO: Checking backup consistency (untilTime=2021-01-18 15:36:24, backupCatalogPath=/backup/CATALOG_BKP, logBackupPaths=/backup/LOG_BKP, dataBackupPaths=/backup/DATA_BKP, backintVersion=None, useBackintBackupCatalog=False, backintCatalogParamFile=None, backintDataParamFile=None, backintLogParamFile=None, ignoreDeltaDataBackups=False, database=HDB) 18.01.2021 18:29:27 INFO: Calling hdbbackupdiag -v -t -B -u 2021-01-18\ 15:36:24 -d /backup/CATALOG_BKP 18.01.2021 18:29:31 INFO: Calling hdbbackupdiag -v -t -B -u 2021-01-18\ 15:36:24 -d /backup/CATALOG_BKP --check --logDirs /backup/LOG_BKP --dataDir /backup/DATA_BKP No handlers could be found for logger "SAPControlOperations" 18.01.2021 18:30:16 INFO: Successfully checked backup files required for recovery: FULL_databackup_0_1 INCREMENTAL_databackup_incremental_0_1610974716318_0_1 FULL_databackup_2_1 INCREMENTAL_databackup_incremental_1610973620829_1610974716318_2_1 log_backup_2_0_515301952_515403200.1610975198261 log_backup_2_0_515403200_515503744.1610976098263 log_backup_2_0_515503744_515604736.1610976998265 log_backup_2_0_515604736_515726656.1610977898268 log_backup_2_0_515726656_515827136.1610978798270 log_backup_2_0_515827136_515928000.1610979698272 log_backup_2_0_515928000_516028800.1610980598274 log_backup_2_0_516028800_516151552.1610981498276 log_backup_2_0_516151552_516251584.1610982398278 log_backup_2_0_516251584_516352320.1610983298280 log_backup_2_0_516352320_516451520.1610984198282 18.01.2021 18:30:16 INFO: OK - All backup files successfully checked until time 2021-01-18 15:36:24 18.01.2021 18:30:16 INFO: ==== hdbrecovercheck.py finished at 2021-01-18 18:30:16 UTC) (local time: 2021-01-18 18:30:16 UTC) ====

hdbadm@target:/tmp/python_support> hdbbackupdiag -v -t -B -u "2021-01-18 15:36:24" -d /backup/CATALOG_BKP/ --check --logDirs /backup/LOG_BKP/ --dataDir /backup/DATA_BKP/ found backup catalog 1610984198307 from file /backup/CATALOG_BKP/log_backup_0_0_0_0.1610984198307 using backup catalog 1610984198307 from file /backup/CATALOG_BKP/log_backup_0_0_0_0.1610984198307 Backup '/backup/DATA_BKP/FULL_databackup_0_1' successfully checked. Backup '/backup/DATA_BKP/INCREMENTAL_databackup_incremental_0_1610974716318_0_1' successfully checked. Backup '/backup/DATA_BKP/FULL_databackup_2_1' successfully checked. Backup '/backup/DATA_BKP/INCREMENTAL_databackup_incremental_1610973620829_1610974716318_2_1' successfully checked. Backup '/backup/LOG_BKP/log_backup_2_0_515301952_515403200.1610975198261' successfully checked. Backup '/backup/LOG_BKP/log_backup_2_0_515403200_515503744.1610976098263' successfully checked. Backup '/backup/LOG_BKP/log_backup_2_0_515503744_515604736.1610976998265' successfully checked. Backup '/backup/LOG_BKP/log_backup_2_0_515604736_515726656.1610977898268' successfully checked. Backup '/backup/LOG_BKP/log_backup_2_0_515726656_515827136.1610978798270' successfully checked. Backup '/backup/LOG_BKP/log_backup_2_0_515827136_515928000.1610979698272' successfully checked. Backup '/backup/LOG_BKP/log_backup_2_0_515928000_516028800.1610980598274' successfully checked. Backup '/backup/LOG_BKP/log_backup_2_0_516028800_516151552.1610981498276' successfully checked. Backup '/backup/LOG_BKP/log_backup_2_0_516151552_516251584.1610982398278' successfully checked. Backup '/backup/LOG_BKP/log_backup_2_0_516251584_516352320.1610983298280' successfully checked. Backup '/backup/LOG_BKP/log_backup_2_0_516352320_516451520.1610984198282' successfully checked. hdbadm@target:/tmp/python_support>