Re: How long to keep archive logs?

  • From: Howard Latham <howard.latham@xxxxxxxxx>
  • To: Mayen.Shah@xxxxxxxxxx
  • Date: Wed, 21 Apr 2010 13:09:01 +0100

If you have spare disk you might as well use it for something. Keeped logs
beyond business's archive policy may save the day one say. however I agree
you shouldnt delete archive logs that are within the required window.

On 21 April 2010 13:03, <Mayen.Shah@xxxxxxxxxx> wrote:

>
> You should never never have archived log retention based on space
> availability. It should be based on your recovery requirements.
>
> - Mayen
>
>
>
>
>
> *"Juan Miranda" <jcmiranda@xxxxxxxxx>*
> Sent by: oracle-l-bounce@xxxxxxxxxxxxx
>
> Apr 21 2010 05:05 AM
>  Please respond to
> jcmiranda@xxxxxxxxx
>
>   To
> janine@xxxxxxxxxx, "'oracle-l L'" <oracle-l@xxxxxxxxxxxxx>
>  cc
>   Subject
> RE: How long to keep archive logs?
>
>
>
> Hi
>
> This script delete archivelogs (older first) if free space on disk is less
> than a value:
>
> ---
> echo  "Free space in /archivelog"
> free_space=`df -m /archivelog | grep dev | awk '{print $4}'`
> echo $free_space
>
> # Min free 10GB
> min_free_spc=10000
>
> while [ $free_space -lt $min_free_spc ]
> do
>  echo "deleting 10 archivelogs "
>  find /archivelog -type f | xargs  ls -l --time-style=long-iso | grep .arch
> | sort -r -k6 -k7 | awk '{print $8}' | tail | xargs rm
>  free_space=`df -m /archive_orzan | grep dev | awk '{print $4}'`
>  echo $free_space
> done
> ---
>
> You must create a cron task to execute it.
> This way you always have an amount of archivelogs on disk AND free space
> available.
>
> This is for linux, tell me if you need it for Windows.
> And... try RMAN.
>
> Juan.
>
>
> -----Mensaje original-----
> De: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]
> En
> nombre de Janine Sisk
> Enviado el: martes, 20 de abril de 2010 21:07
> Para: oracle-l L
> Asunto: How long to keep archive logs?
>
> Here comes another one of those extremely newbie questions...
>
> I have turned on archive logging for the first time, so of course I now
> have
> large archive log files piling up.
>
> I currently do my backups via the caveman begin/end backup method, because
> it works very well with Amazon EC2's snapshot feature.  I eventually plan
> to
> implement RMAN backups as well, but have not done it yet.
>
> I have gathered from the reading I have done that archive logs do not need
> to be kept once a backup has been taken, but I'm not sure if that applies
> to
> the type of backups I'm doing or if it is only true if RMAN is involved.
>  It
> seems logical that I would not need them;  if I needed to recover back to
> before the last snapshot, I would just restore that and be done with it.
>
> Can anyone tell me what a reasonable deletion strategy would be for these
> log files?
>
> thanks,
>
> janine
>
>
> --
> //www.freelists.org/webpage/oracle-l
>
>
> --
> //www.freelists.org/webpage/oracle-l
>
>
>
>
>


-- 
Howard A. Latham

Other related posts: