About this task
After
every successful full database backup operation or full table space
backup operation, the database manager prunes the recovery history
file according to the settings of the
num_db_backup and
rec_his_retentn configuration
parameters when all of the following conditions are true:
If you set the auto_del_rec_obj database
configuration parameter to ON, then the database
manager will do the following in addition to pruning entries from
the recovery history file:
- Delete the physical log files associated with the pruned entries
- Delete the backup images associated with the pruned entries
- Delete the load copy images associated with the pruned entries
If there are no full database backup images available for
consideration in the current recovery history (perhaps none were ever
taken), then images older than the range of time specified by rec_his_retentn will
be deleted.
If the database manager is unable to delete a
file because the file is no longer at the location listed in the recovery
history file, then the database manager will prune the history entry.
If
the database manager is unable to delete a file because of a communication
error between the database manager and the storage manager or device,
then the database manager will not prune the history file entry.
When the error is resolved, the file can be deleted during the next
automated prune.
To configure the database manager to automatically delete
unneeded recovery objects:
Example
Consider the
following scenario, which shows how the settings for automatic deletion
interact. User1's backup plan specifies a weekly full database backup,
with two incremental backups during the week. User1 has the following
configuration:
- auto_del_rec_obj=ON
- rec_his_retentn=0
- num_db_backups=3
In this scenario, User1 keeps three weeks of history, three full
backups, and all of the incremental backups and logs in between those
backups. With this configuration, if User1 changes to daily backups,
User1 keeps three days of history, three full backups, and all of
the incremental backups and logs in between those backups.
If
User1 changes to the following configuration:
- auto_del_rec_obj=ON
- rec_his_retentn=15
- num_db_backups=3
User1 still keeps three weeks of history, three full backups,
and all of the incremental backups and logs in between those backups.
However, if User1 changes to daily backups, User1 keeps 15 days of
history, 15 full backups, and all of the incremental backups and logs
in between those backups.