Video Screencast Help

Deleting obsolete archive logs after an Oracle backup

Created: 12 Jul 2012 • Updated: 12 Jul 2012 | 1 comment

Hi, I have Oracle backups (generated using the template wizard) on a variety of OS's (RedHat, Solaris 9 & 10, Windows 2003 & 2008). When I generated the backup templates for them I selected to include archive logs and not delete them after the backup as the DBA's in my organisation would like to keep 28 days worth of archive logs on the local disks of each server. This was with the view to deleting the required number of archive logs by adding a command to the script generated from the template later on.

I am struggling to find a way to purge archive logs that are older than 28 days. I have tried generating a shell script from the template but this didn't work as it seemed to error on the "ALLOCATE CHANNEL FOR MAINTENANCE" syntax when ran as a script (which resulted in the backup pieces being sent to the local disk in a location other than that specified for disk backups in RMAN) yet the same commands worked when manually input into RMAN.

I would now like to pursue a different method yet I am having problems with this also. I wish to simply use the Oracle templates I have created as intended but then run a post-backup script to execute the RMAN "delete obsolete" command (as the RMAN catalogue recovery window is set to 28 days so anything older than that should be marked as obsolete) but I can't find a bpend_notify Solaris/RedHat script for use with multi-streamed backups.

My NetBackup 7.5 master server is Windows 2008 so I don't believe it has the required scripts for Linux/Unix anywhere and I have checked the client goodies folder but there aren't any in there either.

Any help with this, including suggesting a different way to do this, is much appreciated.



Comments 1 CommentJump to latest comment

Will Restore's picture

this would be better run in Oracle by the DBA rather than in NetBackup script. 

Will Restore -- where there is a Will there is a way