three types of retentions are there
1.redudancy retention
2.recovery window retention
3.keep until retention
1.redudancy retention:here the one database backup will be kept always as REDUNDANCY is 1 o
when we take a proper new backup the last one will become obsolete
rman>show all;
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
rman>show all;
rman>list backup;
rman>report obsolete;
rman> backup database plus archivelog;
rman>list backup;
rman>show all;
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
rman>report obsolete;
rman>delete obsolete;
rman>list backup summary;
rman> backup database plus archivelog;
rman>list backup summary;
rman>list backup;
rman>delete noprompt obsolete;
####################################### recovery window
################
eg 3 days window
rman >show all;
#change policy from redundancy(default) to recovery window
rman>configure retention policy to recovery window of 3 days;
rman >show all;
rman>report obsolete;
rmn>list backup;
rman>backup database plus archivelog;
rman>list backup summary;---4files
rman>report obsolete;
if todays is 20 date sun
#change date to 21 mon
rman>backup database plus archivelog;
rman>list backup summary;-----8files
rman>report obsolete;
#change date to 22--tuesday
rman>backup database plus archivelog;
rman>list backup summary;-----12files
rman>report obsolete;
#change date to 23 --wed
rman>report obsolete;
you will see the backup obolete and archivelog also plus meta data
#currently archivelog seq
rman>backup database plus archivelog;
rman>list backup summary;-----16files
rman>report obsolete;
#change date to 24 --wed
rman>report obsolete;
obsolete things are
archivelog seq + backup piece + archivelog seq
rman>delete obsolete;
rman>report obsolete;
nothing is obsolete now.
keep until
rman> backup database keep until time 'sysdate+7';
this overrites the set value of the retention for this backup
and make it obsolete oon the 8th day
No comments:
Post a Comment