Full RMAN Incremental Backup to Tape
#!/bin/ksh
#
#  Description: RMAN Full Incremental Level 0 Backup to Tape Including Archive Logs
#

export ORACLE_SID=SID
export ORACLE_HOME=/u01/app/oracle/product/10.2.0
export PATH=$PATH:$ORACLE_HOME/bin
export NLS_DATE_FORMAT="DD-MON-YYYY:HH24:MI:SS"
export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export DATE=`date '+%d%m%y_%H%M%S'`
export LOG=/home/oracle
export LOGFILE=${LOG}/rman_${ORACLE_SID}_tape_backup_${DATE}.log
$ORACLE_HOME/bin/rman log=$LOGFILE <<eof

connect target /;

run {
allocate channel ch1 type  'sbt_tape'  parms="ENV=(NB_ORA_CLASS=wfd-oracle-djsol_1)" ;
allocate channel ch2 type  'sbt_tape'  parms="ENV=(NB_ORA_CLASS=wfd-oracle-djsol_1)" ;
allocate channel ch3 type  'sbt_tape'  parms="ENV=(NB_ORA_CLASS=wfd-oracle-djsol_1)" ;
allocate channel ch4 type  'sbt_tape'  parms="ENV=(NB_ORA_CLASS=wfd-oracle-djsol_1)" ;
backup incremental level 0 filesperset 5 database format 'rman_${ORACLE_SID}_${DATE}_%U_%t' plus archivelog;
backup current controlfile format 'rman_${ORACLE_SID}_cntlfile_${DATE}.cf' ;
release channel ch1;
release channel ch2;
release channel ch3;
release channel ch4;
}

eof
exit
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License