Veritas-bu

[Veritas-bu] newbie - netbackup/oracle on unix to win netbackup server

2003-02-13 19:43:13
Subject: [Veritas-bu] newbie - netbackup/oracle on unix to win netbackup server
From: ssesar AT rcn DOT com (Steven L. Sesar)
Date: Thu, 13 Feb 2003 19:43:13 -0500
Here's a function for hot backups that I use:

rmanHOT () {

CMD="
ORAENV_ASK=NO
ORACLE_SID=`echo $NB_ORA_PC_SCHED | awk -F_ '{print $2}'`
ORACLE_HOME=`cat /var/opt/oracle/oratab | grep -v "^#" | grep $ORACLE_SID | 
awk -F: '{print $2}'`
. /apps/bin/oraenv
export ORACLE_HOME ORACLE_SID
$RMAN target $TARGET_CONNECT_STR rcvcat $CATALOG_CONNECT_STR msglog 
$RMAN_LOG_FILE append <<EOF
run {
sql 'alter system checkpoint';
ALLOCATE CHANNEL ch00
TYPE 'SBT_TAPE';
sql 'alter system checkpoint';
BACKUP
     $BACKUP_TYPE
     TAG '$TAG'
     FILESPERSET 1
     FORMAT 'bk_$TAG%s_p%p_t%t'
     DATABASE
     INCLUDE CURRENT CONTROLFILE;
sql 'alter system archive log current';
BACKUP
    FILESPERSET 1
    ARCHIVELOG UNTIL TIME 'SYSDATE' DELETE INPUT;
RELEASE CHANNEL ch00;
}
EOF
"

if [[ "$CUSER" = "root" ]]
then
    su  - "$RUN_AS_USER" -c "$CMD" >> $RMAN_LOG_FILE
    RSTAT=$?
else
    ksh -c "$CMD" >> $RMAN_LOG_FILE
    RSTAT=$?
fi

if [[ "$RSTAT" = "0" ]]
then
    LOGMSG="ended successfully"
else
    LOGMSG="ended in error"
fi

# -----------------------------------------------------------------
# Log the completion of this script.
# -----------------------------------------------------------------

echo >> $RMAN_LOG_FILE
echo Script $0 >> $RMAN_LOG_FILE
echo ==== $LOGMSG on `date` ==== >> $RMAN_LOG_FILE

exit $RSTAT

}


On Wednesday 12 February 2003 19:00, Broun, Bevan wrote:
> Hi
>
> Im a newbie to Netbackup and to oracle. We have oracle 9.2 running on a
> solaris 8 box, we are using netbackup 4.5. The netbackup server is a
> windows 2000 box - we only want to use netbackup to backup hot databases to
> the windows box but we have managed to backup non database files without
> problem.
>
> Ive tried to run the jbpSA script but this bombs out with:
> <jbpSA>
> getAppletParameter - applet is null, returning default value.
> com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/UpFolder.gif not
> found.
> com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/ListView.gif not
> found.
> com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/Computer.gif not
> found.
> com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/File.gif not found.
> com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/Directory.gif not
> found.
> com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/FloppyDrive.gif not
> found.
> com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/NewFolder.gif not
> found.
> com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/DetailsView.gif not
> found.
> com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/HomeFolder.gif not
> found.
> com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/HardDrive.gif not
> found.
> com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/JavaCup.gif not found.
> java.lang.NullPointerException: NullPointerException
> </jbpSA>
>
> So Ive tried copying the rman/samples/hot_database_backup.sh and editing.
> At first we had an authentication error but we fixed that. Now we have:
>
> <LOG>
> Script /usr/local/sysadmin/backup/bin/psetest_hot_database_backup.sh
> ==== started on Wed Feb 12 15:27:10 EST 2003 ====
>
>
> RMAN: /home/oracle/bin/rman
> ORACLE_SID: PSETEST
> ORACLE_USER: oracle
> ORACLE_HOME: /home/oracle
>
> NB_ORA_FULL: 1
> NB_ORA_INCR: 0
> NB_ORA_CINC: 0
> NB_ORA_SERV: ctxmeta
> NB_ORA_POLICY: Oracle_on_Oceanus
>
> Full backup requested
> RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20>
> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35> 36> 37> 38>
>  RMAN> E_TEST (DBID=2453592760)
>  using target database controlfile instead of recovery catalog
>
>  RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20>
>  21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35> 36> 37> 38>
>
>   RMAN-00571: ===========================================================
>   RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
>   RMAN-00571: ===========================================================
>   RMAN-03009: failure of allocate command on ch00 channel at 02/12/2003
>   15:27:12
>   ORA-19554: error allocating device, device type: SBT_TAPE, device name:
>   ORA-27211: Failed to load Media Management Library
>   Additional information: 25
>
>   RMAN>
>
>   Recovery Manager complete.
>
>   Script /usr/local/sysadmin/backup/bin/psetest_hot_database_backup.sh
>   ==== ended in error on Wed Feb 12 15:27:12 EST 2003 ====
>
> </LOG>
>
> The relevant bit of the script is:
>
> <SCRIPT>
> $RMAN target $TARGET_CONNECT_STR nocatalog msglog $RMAN_LOG_FILE append <<
> EOF
> RUN {
> ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
> ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
> BACKUP
>     $BACKUP_TYPE
>     SKIP INACCESSIBLE
>     TAG hot_db_bk_level0
>     FILESPERSET 5
>     # recommended format
>     FORMAT 'bk_%s_%p_%t'
>     DATABASE;
>     sql 'alter system archive log current';
> RELEASE CHANNEL ch00;
> RELEASE CHANNEL ch01;
> # backup all archive logs
> </SCRIPT>
>
> I get the feeling that SBT_TAPE is not correct but dont know what to set it
> to.
>
> HELP PLEASE
>
> TIA
>
> BB
> _______________________________________________
> Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
> http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu



<Prev in Thread] Current Thread [Next in Thread>