Oracle® Database Backup and Recovery Basics 10g Release 2 (10.2) Part Number B14192-02 |
|
|
View PDF |
This section contains the following sections:
Run the CHANGE
...
UNAVAILABLE
command when a backup cannot be found or has migrated offsite. RMAN does not use files marked UNAVAILABLE
in RESTORE
or 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:
Issue a LIST
command to determine the availability status of RMAN backups. For example, issue:
LIST BACKUP;
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;
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: TheKEEP 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';