Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: 10g RMAN Initial Script Change

Re: 10g RMAN Initial Script Change

From: Evan <eehrenh_at_comcast.net>
Date: Tue, 30 May 2006 11:08:04 -0400
Message-ID: <447C5FD4.2020105@comcast.net>


One technique would be to wrap your code in a script to handle the following psudo code. Notes:
1) This is from the KSH days. Grid/EM scripts look different (RTFM?). 2) This script as shown does not scrape the logs, don't forget to include them in the inner script (so you can have additional retention on Monthly if needed.

Hope this helps,

Evan

dow=$(date +%w)
dom=$(date +%e)
if [ $dom -ne 1 ]

   then
   if [ $dow -ne 0 ]
   then

      BKP_TYPE=DAILY
      if [ $dow -eq 1 -o $dow -eq 3 -o $dow -eq 5 ]
      then
- Do a non-weekly level 1 on Mon, Wed, Fri
         BKP_LVL=1
         BKP_TYPE=DAILY
      else
- Do a non-weekly level 2 on Tue, Thu, Sat
         BKP_LVL=2
         BKP_TYPE=DAILY
      fi

   else
- Do a weekly level 0 on Sundays.
      BKP_TYPE=WEEKLY
      BKP_LVL=0

   fi
else
- Do a level 0 on the first of the month - with the tag of MONTHLY for longer retention.

   BKP_TYPE=MONTHLY
   BKP_LVL=0
fi

Michael42 wrote:
> Hello,
>
> In Oracle 10g R2 the default script that comes with RMAN just performs
> an
> Incremental (level 1) backup everyday (below). Could someone please
> show me how to modify it so as it will perform a Level 0 backup every
> Friday. I want to do this without splitting this into two jobs.
>
> run {
> allocate channel oem_disk_backup device type disk;
> recover copy of database with tag 'ORA$OEM_LEVEL_0';
> backup incremental level 1 cumulative copies=1 for
> recover of copy with tag 'ORA$OEM_LEVEL_0' database;
> }
>
>
> Thanks,
>
> Michael42
>
Received on Tue May 30 2006 - 10:08:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US