Databases Reference
In-Depth Information
The BACKUP command with the KEEP UNTIL TIME clause ensures that RMAN exempts this backup from any
configured retention polices and retains it for six months after the backup. The BACKUP command also creates the
restore point 2012Q1 to mark the SCN at which the backup will be consistent.
Note
Backups that use the backup...keep command are also known as archival backups .
Note that you need to specify a location other than the fast recovery area for any backup files you want to make
with the keep attributes. If you try to store these files in the fast recovery area, you may encounter the following error:
RMAN> backup database keep forever tag 'semi_annual_bkp';
Starting backup at 12-SEP-12
starting full resync of recovery catalog
full resync complete
current log archived
channel ORA_DISK_1: starting piece 1 at 12-SEP-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 09/12/2012 14:22:59
ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes
RMAN>
You may sometimes need to retain a given backup forever. As long as you're using a recovery catalog, you can
simply use the keep forever option during a backup command to exempt a backup copy from any retention policies:
run
{
backup database
tag quarterly
keep forever
restore point Y2012Q1;
}
One of the common uses of archival backups is to use them for creating a test database on a different server.
Since you won't need the backups after you create the test database from the backups, you can set the keep parameter
to sysdate+1, meaning that the backup will become obsolete a day after the backup is made, regardless of your backup
retention policy. Here's an example:
Run
{
backup database
tag quarterly
keep until time 'sysdate+1'
restore point Y2012Q1;
}
 
Search WWH ::




Custom Search