Re: RMAN incremental backup

  • From: seekuel <seekuel@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Mon, 13 Dec 2010 16:00:52 +0800

Hi all,

I have ran the script successfully using manual but when running it as a
script will not follow the location that I defined for rman. Please see
script below. I plan to test level 0 and level 1 first then will go to BCT
activation.

----------------------
#!/bin/bash
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_SID=TEST
export PATH=$PATH:$ORACLE_HOME/bin
export NLS_DATE_FORMAT='DD-MON-YY HH24:MI:SS'
export DATE=`date +%F`

rman target sys/password@xxxxxxxxxxx catalog rman/rmanpasswd msglog
/home/oracle/rman_logs/level_0_rman_backup_${DATE}.log << EOF

run {
        SQL 'alter system switch logfile';
        CROSSCHECK BACKUP;
        crosscheck archivelog all;
        backup incremental level 0;
        allocate channel IECEP device type disk format
'/rman/CLONE/archives/rman_t%t_s%s_p%p.bak';
        backup database plus archivelog delete input;
        release channel IECEP;
    }

exit;
EOF
----------------------

As you can see the location defined is /rman/CLONE/archives/ but all are
placed under $ORACLE_HOME/dbs. Is there something wrong with the script?

Appreciate the advices.

Thank you,
Sandeil

Other related posts: