You can report backup sets, backup pieces and datafile copies that are obsolete, those which are not needed to meet a specified retention policy, by specifying the OBSOLETE keyword. To report obsolete backups:
- Start RMAN and connect to a target database and recovery catalog (if used).
- Execute the CROSSCHECK command to update the status of backups in the repository compared to their status on disk.
In the simplest case, you could crosscheck all backups on disk, tape or both, using any one of the following commands:
CROSSCHECK BACKUP DEVICE TYPE DISK;
CROSSCHECK BACKUP DEVICE TYPE sbt;
CROSSCHECK BACKUP;
#crosshecks all backups on all devices
- Run REPORT OBSOLETE to identify which backups are obsolete because they are no longer needed for recovery.
If you do not specify any other options, then REPORT OBSOLETE displays the backups that are obsolete according to the current retention policy, as shown in the following example: