You can prevent key recovery history file entries from being pruned, and associated recovery objects from being deleted by setting the status of the recovery history files entries to do_not_delete.
You can remove (prune) recovery history file entries using the PRUNE HISTORY command, the ADMIN_CMD procedure with PRUNE_HISTORY, or the db2Prune API. If you use the AND DELETE parameter with PRUNE HISTORY, or the DB2PRUNE_OPTION_DELETE flag with db2Prune, and the auto_del_rec_obj database configuration parameter is set to ON, then the associated recovery objects will also be physically deleted.
The database manager also prunes the recovery history file entries as part of automated pruning. If the auto_del_rec_obj database configuration parameter is set to ON, the database manager will delete the recovery objects associated with any entries that are pruned.
To protect key recovery history file entries and associated recovery objects:
There are three ways to prune entries marked do_not_delete:
Those entries that are marked do_not_delete will never be pruned from the recovery history file unless you perform one of these three procedures.
Restrictions:
You can set the status of only backup images, load copy images, and log files to do_not_delete.
The status of a backup entry is not propagated to load copy images, non-incremental backups, or log files related to that backup operation. If you want to save a particular database backup entry and its related log file entries, you must set the status for the database backup entry and the entry for each related log file.