RMAN - "KEEP' and 'CHANGE'
- From: David Barbour <david.barbour1@xxxxxxxxx>
- To: oracle-l <oracle-l@xxxxxxxxxxxxx>
- Date: Thu, 15 Jan 2009 18:11:13 -0500
In my ignorance ........
Running Oracle 10.2.04 on AIX 6.1 using Tivoli Storage Manager (not that it
really matters here, but I like folks to get the lay of the land). I do have
a recovery catalog.
I take monthly backups that need to be retained beyond the mandated 21-day
recovery window. Unfortunately, I have backed them up in the past using
run{
backup full format 'full_%d_%T_%U.mth'
database plus archivelog;}
Note the format tag has 'mth' at the end. This allows me to specify a
different TSM management class which puts these backups in a seperate tape
pool for offsite storage. My normal backups use a .bus and .arc tag at the
end of the format string.
But Ooops! I really want to be able to script 'REPORT OBSOLETE and DELETE
OBSOLETE'. I've run
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 21 DAYS;
Now if I run 'REPORT OBSOLETE' my older monthly backups are listed. Okay,
I get it. BUT .... I try to 'KEEP' them and I get this:
RMAN> change backupset 1184370 keep forever nologs;
using channel ORA_SBT_TAPE_1
using channel ORA_SBT_TAPE_2
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of KEEP command at 01/15/2009 17:28:26
RMAN-06530: CHANGE ... KEEP not supported for backup set which contains
archive logs
Darn! I don't want to keep the archive logs for a year. The backupset is
part of a series of backup pieces that include logfiles and are in fact
self-contained. So what about 'CHANGE'?
The FM says "Change the status of backups, copies, and archived logs in the
repository to AVAILABLE or UNAVAILABLE. This feature is useful when a
previously unavailable file is made available again, or you do not want a
specific backup or copy to be eligible to be restored but also do not want
to delete it."
So I run:
RMAN> change backupset 1380452 unavailable;
changed backup piece unavailable
backup piece handle=full_VENDEV_20081215_c5k2bh3c_1_1.bus recid=1305
stamp=673563758
Changed 1 objects to UNAVAILABLE status
This is good. Now I 'DELETE OBSOLETE;' and get this:
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 1380452 15-DEC-08
Backup Piece 1380465 15-DEC-08
full_VENDEV_20081215_c5k2bh3c_1_1.bus
Arrrrgh!
Anybody have a similar issue/solution?
Other related posts:
- » RMAN - "KEEP' and 'CHANGE' - David Barbour