Determining Required Recovery files in HANA database
I want to create a list of HANA log files that I need in order to restore the Hana database to a specified timestamp.
HANA 1.0 rev 74
Host: scale out x 6nodes
Timestamp to restore the database: 2014-11-30 23:30:00.000
Last backup start at Nov 30 19:00
and finish at Nov 30 23:06
Following the SAP Note 1821207 (Determining Required Recovery files for HANA) I should use the command
hdbbackupdiag -f -d /usr/sap/SID/backup/log -u "2014-11-30 23:30:00"
but I have a strange result from this command!
I obtained the output attached as backupdiag.txt
the strange is that if I analyze the list (1270 files...), I see that for example the last file is created at
ls -lrt /usr/sap/SID/HDB20/backup/log/log_backup_8_0_129864262528_129881037696.1417450717272
Dec 1 17:18 /usr/sap/SID/HDB20/backup/log/log_backup_8_0_129864262528_129881037696.1417450717272
How is it possible that the creation date of the last log file that I need to recover in order to recover the database is greater than Nov 30 23:30 ??
I think there is some trouble.. :-)
I created a simple query on HDBSQL in order to double check the list of hana log to recover starting from the time of the start of the last backup.. and the result is different (query.txt) (the last file is created at Nov 30 23:09)
Is there anybody that can tell me the reason of this problem? I'm doing wrong to run the command hdbbackupdiag ?
Thank you very much
I think the issue comes from the fact that in your command line you did not specify from which catalog the tool reads the informations required.
The command line as it is in your case, let the hdbbackupdiag use the latest available backup catalog, which - obviously - contains also the information related to the log backups beyond the point-in-time you specified.
So, in order to have only the partial information you require, you need to modify the command line adding the "-c" option, specifying the catalog to read from.
For example, the command line would look like:
hdbbackupdiag -f -d /backup/<SID>/log -c log_backup_0_0_0_0.1418209887536 -u "2014-12-10 12:00:00"
The file "log_backup_0_0_0_0.1418209887536", is nothing but the first backup of the name server ( which also contains also the backup catalog ) executed beyond the desired P-I-T, that you can pick up from the catalog ( either with a query on the db or directly from SAP HANA Studio ).
If you take a look at the two files I've uploaded, you're gonna see the differences in terms of command line and in terms of results of the output, given that the desired P-I-T is still the same.
I hope this helps you, though I think this is - however - a bug of the executable, since the application should show me only the file interested by the "-u" switch regardless the backup catalog I'm using ( the latest one, contains also the old backup, so... ).
Please give it a try and let me know.