Backup Recovery   «Prev  Next»
Lesson 7 Report Backup
Objective Report Backup Sets and Datafile Copies

Incremental Report Backup

Reporting on Obsolete Backups

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:
  1. Start RMAN and connect to a target database and recovery catalog (if used).
  2. 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
    
  3. 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:

RMAN> REPORT OBSOLETE;
Datafile Copy 44 08-FEB-06 
/backup/ora_df549738566_s70_s1
Datafile Copy 45 08-FEB-06 
/backup/ora_df549738567_s71_s1
Datafile Copy 46 08-FEB-06 
/backup/ora_df549738568_s72_s1
Backup Set 26 08-FEB-06
Backup Piece 26 08-FEB-06 
/backup/ora_df549738682_s76_s1

You can also check which backups are obsolete under different recovery window-based or redundancy-based retention policies, by using REPORT OBSOLETE with RECOVERY WINDOW and REDUNDANCY options, as shown in these examples:
REPORT OBSOLETE RECOVERY WINDOW OF 3 DAYS;
REPORT OBSOLETE REDUNDANCY 1;

Oracle Backup and Recovery

Oracle Report Commands

REPORT NEED BACKUP DAYS = 7 DATABASE
This report identifies new backup that is required for 7 days worth of archived redo logs for recovery

REPORT NEED BACKUP DAYS = 30 TABLESPACE SYSTEM;
This report identifies new backup for SYSTEM tablespace that is required for 3 days worth of archived redo logs for recovery

REPORT NEED BACKUP INCREMENTAL = 5 DATAFILE 'D:\ORACLE\ORADATA\PETS\INDX01.DBF';
This report identifies the datafiles, which require new backup to revert to the state as of last 3 days.

REPORT OBSOLETE REDUNDANCY=2;
This report identifies backups or copies that have at least 2 more recent backups or copies.


REPORT OBSOLETE REDUNDNACY = 2 UNTIL TIME 'SYSDATE-14';
This report identifies obsolete backups if there are at least 2 copies/backups that are no more than 2 weeks old.

REPORT UNRECOVERABLE DATABASE;
This report determines the datafiles that have had an unrecoverable operation performed against an object residing within the datafile since its last backup.

REPORT SCHEMA AT TIME 'SYSDATE-14';
This report identifies all datafiles and tablespaces within the target database at the current time.

The next lesson describes some of the data dictionary views for backup and recovery.