Home » RDBMS Server » Backup & Recovery » rman retention policy
rman retention policy [message #196128] Wed, 04 October 2006 04:34 Go to next message
alanm
Messages: 282
Registered: March 2005
Senior Member

All,
I am using rman to backup to disk. I need RMAN to keep 2 days worth of data on disk. Is this achieve simply by just setting the RETENTION POLICY TO REDUNDANCY 2.

regards
Alan
Re: rman retention policy [message #196135 is a reply to message #196128] Wed, 04 October 2006 05:14 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
You'll probably want to consider using RECOVERY WINDOW instead of REDUNDANCY.
Re: rman retention policy [message #196144 is a reply to message #196128] Wed, 04 October 2006 05:55 Go to previous messageGo to next message
alanm
Messages: 282
Registered: March 2005
Senior Member

hi,
When I do show all from the rman prompt I do not see RECOVERY WINDOW. How do I implement this.

regards

Re: rman retention policy [message #196151 is a reply to message #196144] Wed, 04 October 2006 06:07 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
You have to use the CONFIGURE RETENTION POLICY command.

You don't mention what version of Oracle you are using, but here are the details for 9i Recovery Window.
Re: rman retention policy [message #196160 is a reply to message #196128] Wed, 04 October 2006 06:28 Go to previous messageGo to next message
alanm
Messages: 282
Registered: March 2005
Senior Member

hi,
yes sorry, I am using 9i standard edition (9.2.0.7)

I have set CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 days;

does RMAN have the ability to delete from disk the obsolete pieces?

regards

Alan
Re: rman retention policy [message #196162 is a reply to message #196160] Wed, 04 October 2006 06:36 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Yes it does. If you are scripting the backups, you'll want to use DELETE NOPROMPT OBSOLETE.
Re: rman retention policy [message #196164 is a reply to message #196128] Wed, 04 October 2006 06:42 Go to previous messageGo to next message
alanm
Messages: 282
Registered: March 2005
Senior Member

hi,
I have tried this and it doesn't seem to work.
my script is as follows

connect target /
run {
delete obsolete redundancy = 1 device type disk;
allocate channel c1 device type disk format '/u05/rman/SID/SID_RMAN_%u_%p_%c' ;
setlimit channel c1 kbytes= 4000000; #limit set to 4GB
backup database plus archivelog;
backup current controlfile;
}

the following if from rman

using target database controlfile instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u00/app/oracle/product/9ir2/dbs/snapcf_ncare.f'; # default


I have no idea why it doesn't work. I want to set the recovery window to 2 and then to prove it works run a number of rman backups and see the previous backup files getting deleted.

regards

Alan.
Re: rman retention policy [message #196166 is a reply to message #196128] Wed, 04 October 2006 06:47 Go to previous messageGo to next message
email.sandeepnaik
Messages: 121
Registered: August 2006
Senior Member
remove
delete obsolete redundancy = 1 device type disk;
and put
delete obsolete noprompt device type disk;

and try again.
Sandeep
Re: rman retention policy [message #196167 is a reply to message #196164] Wed, 04 October 2006 06:55 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
REDUNANCY and RECOVERY WINDOW are mutually exclusive. You typically have one or the other. Since you have configured the retention policy already, all you have to include in your script is:

DELETE NOPROMPT OBSOLETE;

email.sandeepnaik wrote on Wed, 04 October 2006 06:47


delete obsolete noprompt device type disk;

This command will not work.
Re: rman retention policy [message #196210 is a reply to message #196128] Wed, 04 October 2006 09:10 Go to previous message
alanm
Messages: 282
Registered: March 2005
Senior Member

thanks for help guys. it is sorted now.


cheers

Previous Topic: backup set vs. Image Copy
Next Topic: log switching in hot backup
Goto Forum:
  


Current Time: Sat Dec 10 12:41:14 CST 2016

Total time taken to generate the page: 0.10644 seconds