Veritas FlashSnap Point-In-Time Copy Solutions 5.0.1 Administrators Guide, HP-UX 11i v3, First Edition, November 2009

Script to initiate online off-host backup of an Oracle
database
Use this script to initiate online off-host backup of an Oracle database.
#!/bin/ksh
#
# script: backup_online.sh <dbnode>
#
# Sample script for online, off-host backup.
#
# Note: This is not a production level script, its intention is to help
# you understand the procedure and commands for implementing
# an off-host point-in-time copy solution.
export ORACLE_SID=dbase
export ORACLE_HOME=/oracle/816
export PATH=$ORACLE_HOME/bin:$PATH
dbnode=$1
dbasedg=dbasedg
snapvoldg=snapdbdg
newvollist=”snap_dbase_vol source=dbase_vol/newvol=snap_dbase_vol”
snapvollist=”snap_dbase_vol”
volsnaplist=”snap_dbase_vol source=dbase_vol”
exit_cnt=0
arch_loc=/archlog
# Put the Oracle database in hot-backup mode;
# see the backup_start.sh script for information.
su oracle -c backup_start.sh
# Refresh the snapshots of the volumes.
#
# Note: If the volume is not mounted, you can safely ignore the
# following message that is output by the snapshot operation:
#
# ERROR: Volume dbase_vol: No entry in /etc/mnttab for volume
vxsnap -g $dbasedg make $newvollist
# Take the database out of hot-backup mode;
85Files and scripts for sample scenarios
Script to initiate online off-host backup of an Oracle database