Home » RDBMS Server » Backup & Recovery » Re: RMAN SCRIPT TO CLEAR THE BACKUP PIECES OLDER THAN 2 DAYS... (oracle database 11g release 2, OEL 5.5 . 64 bit)
Re: RMAN SCRIPT TO CLEAR THE BACKUP PIECES OLDER THAN 2 DAYS... [message #574226] Tue, 08 January 2013 03:19 Go to next message
sranga.doddi
Messages: 3
Registered: January 2013
Location: India
Junior Member

Is this script is enough to delete the backup pieces older than 2 days.

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
configure device type disk parallelism 1 backup type to compressed backupset;

run
{
allocate channel d1 type disk ;
backup filesperset 5 format '/u06/backup/EBSDEV/EBSDEV_data_t%t_s%s_p%p' database ;
sql 'alter system archive log current' ;
backup filesperset 20 format '/u06/backup/EBSDV3/EBSDV3_arch_t%t_s%s_p%p' archivelog all delete input ;
backup format '/u06/backup/EBSDEV/EBSDEV_control%U' current controlfile ;
backup spfile format '/u06/backup/EBSDEV/EBSDEV_spfile_%U';
sql "alter database backup controlfile to trace as ''/tmp/control.trc'' reuse";

CROSSCHECK BACKUP;
DELETE NOPROMPT OBSOLETE;
DELETE NOPROMPT EXPIRED BACKUP;
}
list backupset summary;
exit;

Thanks in Advance
Sairanga

[Updated on: Tue, 08 January 2013 03:20]

Report message to a moderator

Re: RMAN SCRIPT TO CLEAR THE BACKUP PIECES OLDER THAN 2 DAYS... [message #574231 is a reply to message #574226] Tue, 08 January 2013 03:39 Go to previous message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
depends how often you run it Smile
You might want to use DELETE ALL INPUT, not just DELETE INPUT, or you may have archivelog copies hanging around.
Previous Topic: trying to recover but lattest archive file missing
Next Topic: Re: does the full cold backup of rman include onlinde redologs?
Goto Forum:
  


Current Time: Thu Mar 28 05:35:22 CDT 2024