Alejandro Vargas' Blog

  • February 6, 2007

Backup Archived Logs out of ASM with Rman

Alejandro Vargas
Technical Leader, ACS Global Delivery, Infrastructure & BigData

A couple of possibilities here to backup archived logs out of ASM to File System, and then cleanup the ASM diskgroup of archives already backed up.

What I'm doing in some cases is to move archived logs out to file system, from there they are moved by a backup application to a backup server and to tape.

This Script : Cleanarch  backup archived logs out of ASM to File System, It does this in 2 groups:
Group #1 all archived logs until 12 hours before, are backed up and removed from ASM
Group #2 all archived logs between 12 hours before and the time of the last archived sequence are also backed up but they are kept on ASM.

The until time can be easily changed:
Edit this Line:

v_maxt=`echo "select 'Xx ',max(first_time)-0.5 from $v_logh;"|sqlplus -s '/as sysdba'|grep 'Xx'|awk '{print $2" "$3}'`

Change the expression max(first_time)-0.5 with the time you want, ie -1 = 1day or -0.25 = 6 hours, etc.

Also if instead of backing up you just want to cleanup ASM of archived logs already backed up by other means, ie SRDF, then use this Script: Remarch.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.