Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
When managing backups in Oracle RMAN (Recovery Manager), it’s essential to understand the difference between obsolete and expired backups. This distinction is key for keeping your storage clean and ensuring your database is recoverable within your desired retention policy.
RECOVERY WINDOW 7 DAYS
, any backups older than 7 days will be considered obsolete. RMAN automatically identifies and deletes these backups when necessary, meaning you don’t need to intervene manually. Example retention policy commands: CONFIGURE RETENTION POLICY TO RECOVERY WINDOW 7 DAYS;
CONFIGURE RETENTION POLICY TO REDUNDANCY 7;
rm -rf ...
. RMAN still tracks these backups, even though they no longer exist on disk.To handle expired backups, RMAN provides the command DELETE EXPIRED BACKUP
, which removes entries of backups that no longer exist physically but are still listed in RMAN’s repository.
Here’s the process to manage expired backups effectively:
RMAN> CROSSCHECK BACKUP;
RMAN> DELETE EXPIRED BACKUP;
If you delete backup files manually using a command like:
rm -rf /path/to/backup/files
RMAN will not automatically know about this deletion. To synchronize RMAN’s metadata, you should first run the crosscheck command, followed by delete expired backup to remove outdated entries from the catalog.
RMAN> CROSSCHECK BACKUP;
RMAN> DELETE EXPIRED BACKUP;
One of RMAN’s strengths is its ability to automatically delete obsolete backups based on your retention policy. Once a backup is identified as obsolete (outside the recovery window or redundancy level), RMAN can manage these files without manual intervention. This ensures your system stays clean and efficient, saving space while maintaining recoverability.
Managing backups in RMAN is straightforward when you understand the distinction between obsolete and expired backups. Use the CROSSCHECK
and DELETE EXPIRED BACKUP
commands to keep RMAN’s repository aligned with the actual state of your storage, and trust RMAN’s retention policy to handle obsolete backups automatically.