Re: RMAN: Delete obsolete backups but not obsolete archivelogs

From: <johnbhurley_at_sbcglobal.net>
Date: Thu, 7 May 2009 15:45:39 -0700 (PDT)
Message-ID: <0cbe0655-180b-400c-b85a-3f8b428b2bcf_at_o27g2000vbd.googlegroups.com>



On May 6, 3:44 pm, hea..._at_googlemail.com wrote:
> Hi all,
>
> I want to delete only obsolete backups and not archivelogs due to the
> fact that we have a 2 stage backup process, first to disk, then to
> tape and I have 2 archive log locations, 1 on SAN and another on local
> disk, so I wouldn't want to put all my eggs in one basket and keep my
> backed up archive logs on the local disk in case there is a failure
> before they get off to tape and in the case the tape backup fails,
> because my RMAN disk backup area is on local disk.
>
> I dont want to set recovery window to +7 days because I cant keep this
> many backups on disk due to the size, although I can keep the logs.
>
> I want to handle the archived logs myself by using something like:
> delete archivelog all until 'sysdate-7'
>
> Here is my backup script:
>
> run
> {
> crosscheck archivelog all;
> crosscheck backup;
> crosscheck copy;
> backup database;
> backup archivelog all not backed up 2 times keep until time 'SYSDATE
> +7';
> restore database validate;
> delete noprompt archivelog until time 'SYSDATE-7';
> delete noprompt obsolete;
> sql "create pfile from spfile";
> sql "alter database backup controlfile to trace";
>
> }
>
> If anyone knows any way of doing this just using RMAN please let me
> know.
>
> Thanks
>
> Vinni

I have a similar setup where I want to keep around on disk archivelogs more than the delete obsolete wants to give you.

Many people handle this ( as I do ) outside of rman by hiding away on disk in a different directory the archivelogs that rman would otherwise whack. Received on Thu May 07 2009 - 17:45:39 CDT

Original text of this message