Configuring the backup retention policy
It is imperative that the backups taken at a specific point in time do not occupy the storage space indefinitely. There ought to be a mechanism in place to identify and delete the archaic backups once they are of no significance to the recovery. The retention policy is the configuration from which RMAN identifies the backups which are not relevant to the recovery anymore. This is extremely useful as in a dynamic database, the older backups need to be removed from the storage space because it is the latest backups, containing more recent changes to the database, that will be more useful during recovery.
Based on the configured retention policy, RMAN will mark the old backups as obsolete.
Two mutually exclusive retention policies are available:
Redundancy (the number of copies of the backups to be kept)
Recovery window of n days (the number of days for which the backups need to be kept)
Let's take a look at these two retention policies in detail.