13.8. The Recovery History FileDB2 keeps tracks of all the backup, restore, and roll forward operations performed in a file called db2rhist.asc, also known as the recovery history file. There is a recovery history file for each database, and it is stored in the directory where the database resides. The file is automatically updated when any of the following events occurs:
To see the entries in the recovery history file, use the LIST HISTORY command. For example, to list all the backup operations performed on the SAMPLE database, issue LIST HISTORY BACKUP ALL FOR sample The output looks like this: Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID -- --- ------------------ ---- --- ------------ ------------ --------- B D 20050529122918001 D D S0000007.LOG S0000007.LOG -------------------------------------------------------------------- Contains 3 tablespace(s): 00001 SYSCATSPACE 00002 USERSPACE1 00003 SYSTOOLSPACE ----------------------------------------------------------------------- Comment: DB2 BACKUP SAMPLE OFFLINE Start Time: 20050529122918 End Time: 20050529122939 Status: A ----------------------------------------------------------------------- EID: 21 Location: d:\temp\SAMPLE.0\DB2\NODE0000\CATN0000\20050529 For each backup operation performed, an entry like the one shown above is entered in the history file. The following list shows the information recorded and includes the corresponding information from the preceding output.
If an error occurred during the operation, the error will be recorded as well. With the recovery history file, you can easily track all the backup operations, restore operations, and more. |