Skip Headers
Oracle® Database Backup and Recovery Basics
10g Release 2 (10.2)

Part Number B14192-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

8.6 Changing the Status of a Backup Record

This section contains the following sections:

8.6.1 Marking a Backup AVAILABLE or UNAVAILABLE

Run the CHANGE ... UNAVAILABLE command when a backup cannot be found or has migrated offsite. RMAN does not use files marked UNAVAILABLE in RESTOREor RECOVER commands. If the file is later found or returns to the main site, then you can mark it available again by issuing CHANGE ... AVAILABLE.

Note that files in the flash recovery area cannot be marked as UNAVAILABLE.

To mark a file's status in the repository as UNAVAILABLE or AVAILABLE:

  1. Issue a LIST command to determine the availability status of RMAN backups. For example, issue:

    LIST BACKUP;
    
    
  2. Run CHANGE with the UNAVAILABLE or AVAILABLE keyword to update its status in the RMAN repository. For example, enter:

    CHANGE DATAFILECOPY '/tmp/control01.ctl' UNAVAILABLE;
    CHANGE COPY OF ARCHIVELOG SEQUENCE BETWEEN 1000 AND 1012 UNAVAILABLE;
    CHANGE BACKUPSET 12 UNAVAILABLE;
    CHANGE BACKUP OF SPFILE TAG "TAG20020208T154556" UNAVAILABLE;
    CHANGE DATAFILECOPY '/tmp/system01.dbf' AVAILABLE;
    CHANGE BACKUPSET 12 AVAILABLE;
    CHANGE BACKUP OF SPFILE TAG "TAG20020208T154556" AVAILABLE;
    

See Also:

Oracle Database Backup and Recovery Reference for CHANGE command syntax

8.6.2 Exempting a Long-Term Backup from the Retention Policy

The BACKUP ... KEEP command can create a backup that is retained for a different period of time from that specified by the configured retention policy. The backup is still a fully valid backup, however, and can be restored just as any other RMAN backup. This type of backup is called a long-term backup.


Note:

The KEEP FOREVER clause requires the use of a recovery catalog, because the control file cannot contain an infinitely large set of RMAN repository data.

Specify KEEP ... LOGS to save archived logs for a possible incomplete recovery and KEEP ... NOLOGS not to save archived logs for a possible incomplete recovery. Note that NOLOGS is not valid with an inconsistent backup.

Use the CHANGE command to alter the KEEP status of a backup that already exists. For example, you may decide that you no longer want to keep a long-term backup. The same options available for BACKUP ... KEEP are available with CHANGE ... KEEP.

Note that you cannot set KEEP attributes on files stored in the flash recovery area.

To alter the KEEP status of a backup:

Issue CHANGE ... KEEP to define a different retention period for this backup, or CHANGE ... NOKEEP to let the retention policy apply to this file.

This example allows a backup set to be marked obsolete by the retention policy:

CHANGE BACKUPSET 231 NOKEEP;

This example makes a datafile copy exempt from the retention policy for 180 days (6 months):

CHANGE DATAFILECOPY '/tmp/system01.dbf' KEEP UNTIL 'SYSDATE+180';

Note:

If you use KEEP UNTIL to specify a minimum time to keep a backup, the backup can be kept longer than the time specified if it is needed to satisfy the retention policy. RMAN's DELETE OBSOLETE command does not delete backups needed to satisfy the retention policy, even if KEEP UNTIL has been used to set a minimum length of time for the backup to be kept.