Script to Perform Off-Host Backup
#!/bin/ksh
#
# script: do_backup.sh <list_of_database_volumes>
#
# Sample script for 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.
# Modify the following procedure according to your environment
# and backup method.
snapvoldg=snapdbdg
# Import the snapshot volume disk group.
vxdg import $snapvoldg
# Mount the snapshot volumes (the mount points must already exist).
for i in $*
do
fsck -F vxfs /dev/vx/rdsk/$dbasedg/snap_$i
mount -F vxfs /dev/vx/dsk/$dbasedg/snap_$i /bak/$i
done
# Back up each tablespace.
# back up /bak/ts1 &
...
# back up /bak/tsN &
wait
# Unmount snapshot volumes.
for i in `echo $vollist`
do
umount /bak/$i
done
# Deport snapshot volume disk group.
vxdg deport $snapvoldg
echo "do_backup over"
echo "\007 \007 \007 \007 \007 \007"
|