Amazon books

Wednesday, April 6, 2011

RMAN Delete archivelog backups

If you want to delete archivelog backups made before sysdate-2 execute the command below:

delete noprompt backup of archivelog all completed before 'sysdate-2';

Your archive backup script would be like that:

########################
run{
allocate channel t1 device type disk;

backup
format '/u01/backup/YOUR_DB_%t_%s_%U'
archivelog all
tag 'BKP_ARCH_YOURDB_2hs_2hs';

delete noprompt backup of archivelog all completed before 'sysdate-2';
}
########################

Best Regards,
Paulo Portugal

No comments:

Post a Comment