DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 12

Thread: Removing Archived logs

Threaded View

  1. #3
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    You might want to consider compressing older archived logs. We do that via a nightly cron job:

    00 22,8 * * * /usr/contrib/bin/gzip /u623/oradata/arch/DBNAME/*.arc > /dev/null

    We delete the old archived logs after our weekly hot backup is completed.

    The cleanup script looks like this. (you pass in the instance name)

    >more cleanup_archive.sh
    #! /bin/sh

    INSTANCE=/u623/oradata/arch/$1

    cd $INSTANCE

    /bin/find "$INSTANCE" -type f -name "arch_$1_[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].arc*" -mtime +7 -print -exec rm -f {
    } \;

    exit 0

    This deletes archive logs older than 7 days.
    Last edited by KenEwald; 06-12-2003 at 04:22 PM.
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width