Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: 10g RMAN Initial Script Change
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
BKP_TYPE=WEEKLY BKP_LVL=0
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