DB2 Version 9.7 for Linux, UNIX, and Windows

Recovery history file

A recovery history file is created with each database and is automatically updated during various operations.

The following operations cause the recovery history file to be updated:
Figure 1. Creating and Updating the Recovery History File
The recovery history file is updated during various operations, like backup, rollforward, and restore.

You can use the summarized backup information in this file to recover all or part of a database to a given point in time. The information in the file includes:

To see the entries in the recovery history file, use the LIST HISTORY command.

Every backup operation (database, table space, or incremental) includes a copy of the recovery history file. The recovery history file is associated with the database. Dropping a database deletes the recovery history file. Restoring a database to a new location restores the recovery history file. Restoring does not overwrite the existing recovery history file unless the file that exists on disk has no entries. If that is the case, the database history will be restored from the backup image.

If the current database is unusable or not available, and the associated recovery history file is damaged or deleted, an option on the RESTORE DATABASE command allows only the recovery history file to be restored. The recovery history file can then be reviewed to provide information on which backup to use to restore the database.

The size of the file is controlled by the rec_his_retentn configuration parameter that specifies a retention period (in days) for the entries in the file. Even if the number for this parameter is set to zero (0), the most recent full database backup (plus its restore set) is kept. (The only way to remove this copy is to use the PRUNE command with the FORCE option.) The retention period has a default value of 366 days. The period can be set to an indefinite number of days by using -1. In this case, explicit pruning of the file is required.