rman backup doesn't become obsolete [message #509615] |
Mon, 30 May 2011 09:31 |
|
valmar
Messages: 10 Registered: May 2011
|
Junior Member |
|
|
Hello,
I have a policy running every night and it makes:
- level 0 for datafiles not backed up,
- level 1 for datafile not backed up since 'sysdate-1'
then another policy makes:
- level 0 when the datafiles become read only
The recovery windows is set to 1 day.
In the following situation:
RMAN> list backup of datafile 394;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
12721 Incr 0 13.25M SBT_TAPE 00:01:13 25-MAY-11
BP Key: 12777 Status: AVAILABLE Compressed: NO Tag: ST_TRONLINE_FB20110525
Handle: bk_13201_1_752082473 Media: A00003
List of Datafiles in backup set 12721
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
394 0 Incr 79015872 25-MAY-11 /<pathname>/dfx.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
15462 Incr 0 768.00K SBT_TAPE 00:01:01 27-MAY-11
BP Key: 15474 Status: AVAILABLE Compressed: NO Tag: ST_TRCONS_FB20110527
Handle: bk_13322_1_752218752 Media: A00003
List of Datafiles in backup set 15462
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
394 0 Incr 79174934 26-MAY-11 /<pathname>/dfx.dbf
I expect that the first L0 backup is going to become obsolete, but even if I run crosscheck, it never become obsolete.
Why this is happening ?
Thanks in advance for your answers.
|
|
|
|
|
|
|
|
|
|
Re: rman backup doesn't become obsolete [message #509969 is a reply to message #509684] |
Wed, 01 June 2011 22:29 |
hkchital
Messages: 128 Registered: September 2008 Location: Singapore
|
Senior Member |
|
|
RETENTION POLICY applies to the *BACKUP SET*. You expect it to apply to individual datafiles within a backupset.
You have a backupset that contains a backup of, say , 4 files (fileids 3,4,5,6)
Say you change fileid 5 to readonly.
But fileids 3 4 and 6 are not changed.
Unfortunately, however, there is no new L0 backup since their first backup on day 1.
Therefore, the backupset that contains these datafile backups cannot be obsoleted.
Obsolescence applies to BackupSet, BackupPiece, ProxyCopy or Datafile copy.
You should either create separate BackupSets OR set FILESPERSET to 1 and have each of the datafiles (automatically) go to a separate backupset OR use datafile copy's.
Hemant K Chitale
|
|
|
|
Re: rman backup doesn't become obsolete [message #510906 is a reply to message #510292] |
Wed, 08 June 2011 05:43 |
|
techxpit
Messages: 1 Registered: June 2011 Location: San Francisco
|
Junior Member |
|
|
I believe you may need to modify your backup script and split run in two different "run" statements. In the first "run command, do the backup only. For the backup see how channel is included INSIDE the run and is NAMED, like t1 or whatever.
Then do the second run statement for crosscheck and delete obsolete/expired. Very important, notice how Channel is assigned for MAINTENANCE, and is OUTSIDE the "run". For deleting/obsoleting backups, channel is required to be for Maintenance, may be thats why your backups are not getting deleted. <if a maintenance channel is included inside the "run", we get errors, so make sure for delete maintenance channel is outside the run statement>.
Also, I normally use "delete force noprompt" to make sure stuff gets deleted.
connect target / catalog rman10/rman10@Catdb
run
{
allocate Channnel t1 device type 'SBT_TAPE'
parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm//bin64/tdpo_mydb.opt)';
backup
incremental level 1 cumulative
database
.......
etc
release channel t1
}
allocate channel for maintenance type 'SBT_TAPE'
parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm//bin64/tdpo_mydb.opt)';
run
{
report obsolete;
CROSSCHECK BACKUP;
DELETE force noprompt EXPIRED BACKUP;
delete force noprompt obsolete;
}
release channel;
[Updated on: Wed, 08 June 2011 05:50] Report message to a moderator
|
|
|