Oracle RMAN Report Obsolete Redundancy Command Guide
Oracle RMAN Report Obsolete Redundancy Command Guide
Purpose
The report obsolete redundancy = 2 command in Oracle Recovery Manager (RMAN) identifies database backups that are no longer necessary for recovery operations based on a redundancy-based retention policy. This command helps database administrators determine which backups can be safely deleted to free up storage space while maintaining a minimum of two backup copies for each database file.
Code
1report obsolete redundancy = 2;
Breakdown of Code
The command consists of three main components that work together to evaluate backup retention:
- report - The RMAN command that generates information about backups without making any changes to the database or backup files
- obsolete - Specifies that the report should identify backups that are no longer required for database recovery operations
- redundancy = 2 - Sets the retention criteria to keep exactly two backup copies, marking any older backups beyond this number as obsolete
When you run this command, RMAN checks each datafile, control file, and archived redo log backup against the redundancy threshold. The system evaluates backups chronologically and marks the oldest ones as obsolete once more than two valid copies exist.
Key Points
The command provides essential backup management capabilities for Oracle database administrators:
- Identifies backups that exceed the specified redundancy count of 2
- Does not delete any files - only reports which backups are considered obsolete
- Overrides the currently configured retention policy to test what backups would be obsolete under redundancy 2
- Works with all backup types including full backups, incremental backups, and archived redo logs
- Requires connection to the target database and optionally to a recovery catalog
- Displays output showing backup type, key, completion time, and filename for each obsolete backup
When to Use This Command
Database administrators typically use this command in several scenarios:
- Before implementing a new retention policy to preview which backups would be affected
- When storage space is running low and you need to identify candidates for deletion
- During regular backup maintenance to audit backup coverage
- To verify that your backup strategy maintains adequate redundancy without keeping excessive copies
- When planning storage capacity and estimating space that can be reclaimed
Understanding Redundancy vs Recovery Window
Oracle RMAN offers two retention policy approaches that serve different backup management needs:
Redundancy Policy
A redundancy-based policy specifies the number of backup copies to retain for each database file. With redundancy = 2, RMAN keeps the two most recent backups and marks all older backups as obsolete, regardless of their age. This approach ensures a specific number of backup versions are always available.
Recovery Window Policy
A recovery window policy specifies the number of days for which you want to guarantee recovery capability. For example, a 7-day recovery window means you can recover the database to any point in time within the last 7 days. Any backup older than the window becomes obsolete.
These two policy types are mutually exclusive - you must choose one approach for your database.
How RMAN Determines Obsolete Backups
The redundancy calculation follows a specific logic to protect database recoverability:
- RMAN sorts all backups chronologically by completion time
- For each datafile and control file, the system counts backward from the most recent backup
- The first two backups (with redundancy = 2) are marked as needed
- Any additional older backups are marked as obsolete
- Archive logs needed for recovery with the non-obsolete backups are also retained
This ensures that even if one backup is corrupted, you have at least one additional backup copy available for recovery operations.
Configuring and Using Retention Policies
You can configure the default retention policy that RMAN uses for all operations:
1-- Set redundancy-based retention policy
2CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
3
4-- View current retention policy
5SHOW RETENTION POLICY;
6
7-- Report obsolete backups using configured policy
8REPORT OBSOLETE;
9
10-- Report obsolete backups with specific redundancy
11REPORT OBSOLETE REDUNDANCY 2;
12
13-- Delete obsolete backups
14DELETE OBSOLETE;
The report obsolete redundancy = 2 command allows you to test different redundancy values without changing your configured retention policy.
Best Practices
Follow these recommendations when managing Oracle database backups with redundancy policies:
- Always run
REPORT OBSOLETEbefore runningDELETE OBSOLETEto verify which backups will be removed - Set redundancy to at least 2 to maintain protection against corrupted backups
- Regularly monitor Fast Recovery Area (FRA) space usage if backups are stored there
- Document your retention policy decisions based on business recovery requirements
- Test backup restoration regularly to ensure non-obsolete backups are valid
- Consider archive log requirements - RMAN automatically retains logs needed for recovery with non-obsolete backups
- Coordinate RMAN retention policies with media manager or backup software retention settings to avoid inconsistencies
Understanding Command Output
When you execute the command, RMAN displays information in a structured format:
1RMAN retention policy will be applied to the command
2RMAN retention policy is set to redundancy 2
3Report of obsolete backups and copies
4Type Key Completion Time Filename/Handle
5-------------------- ------ ------------------ --------------------
6Datafile Copy 44 08-FEB-13 /backup/ora_df549738566_s70_s1
7Backup Set 8863 30-SEP-15 [backup piece name]
The output shows the backup type, unique key identifier, when the backup completed, and the file location. This information helps you understand exactly which backups RMAN considers obsolete.
Differences from Expired Backups
Understanding the distinction between obsolete and expired backups is important for effective backup management:
Obsolete backups are files that still exist but are no longer needed based on your retention policy. They can be safely deleted to reclaim storage space.
Expired backups are backup records in the RMAN repository that reference files that no longer exist on disk or tape. The physical files were deleted outside of RMAN, and the repository records need to be updated with the CROSSCHECK command.
Related Commands
Several RMAN commands work together for comprehensive backup lifecycle management:
CROSSCHECK BACKUP- Verifies that backups recorded in the repository still exist physicallyDELETE OBSOLETE- Removes obsolete backups from disk or tape and updates the repositoryDELETE EXPIRED BACKUP- Removes repository records for backups that no longer existREPORT SCHEMA- Shows the datafiles that need backupREPORT NEED BACKUP- Identifies files requiring backup based on retention policyLIST BACKUP- Displays detailed information about all available backups
Common Use Cases
Database administrators use this command in daily operations:
Storage management: When backup disk space reaches capacity, identify obsolete backups that can be deleted to free space for new backups.
Policy testing: Before changing the configured retention policy, test different redundancy values to understand the impact on backup retention and storage requirements.
Compliance audits: Verify that backup retention meets organizational requirements for maintaining multiple backup copies for disaster recovery scenarios.
Capacity planning: Calculate how much storage space can be reclaimed by implementing a specific redundancy policy.
References
- Reporting on RMAN Operations - Oracle Help Center - Official Oracle documentation covering RMAN report commands including REPORT OBSOLETE syntax and examples
- RMAN Expired vs Obsolete Backups - DBA Genesis Support - Explains the difference between expired and obsolete backups with practical DBA actions
- RMAN Retention Policy Based On Redundancy Policy - Learnomate - Tutorial on configuring and using redundancy-based retention policies
- RMAN Retention Policy - Julian Dyke - Technical reference for RMAN retention policy configuration options
- Backup Retention Policies - Oracle Documentation - Detailed explanation of retention policy concepts including redundancy and recovery window
- Difference between Recovery and Redundancy Window - Oracle World - Practical comparison of redundancy vs recovery window retention policies with examples
- Best Practice for maintaining a consistent backup catalog - Veritas - Best practices for coordinating RMAN retention with backup software