Hello everyone...
Again it seems that I've gotten more responses this time than with my
original post...
Anyway, the two best ways to vdump to a remote machine are:
1) Use: /sbin/vdump -LEVEL -u -b 60 -f - FILESYSTEM | rsh DUMPHOST
/usr/bin/dd of=/dev/tape bs=BLOCKSIZE
or
2) put this into a nifty script called 'rvdump:'
--- Script begins here ---
#!/bin/ksh
#
# rvdump
#
# vdump script which accepts `-f [[user_at_]host:]device' for dumping
# to a remote device
#
# R.P.Bellis 1995
#
# set location of programs used
dd=/bin/dd
getopt=/bin/getopt
rsh=/bin/rsh
tr=/bin/tr
vdump=/sbin/vdump
# parse command line arguments
set -- `$getopt 0123456789CDNVhquvwF:T:b:f:x: $*`
if [ $? != 0 ]
then
exec $vdump
fi
# set initial variables
level=""
file=""
args=""
bs="60"
# scan argument list
while [ $1 != -- ]
do
case $1 in
-[0-9])
if [ "$level" = "" ]; then
level=$1
else
exec $vdump
fi
;;
-F|-T|-x)
args="$args $1 $2"
shift
;;
-b)
bs="$2"
shift
;;
-f)
file="$2"
shift
;;
*)
args="$args $1"
;;
esac
shift
done
# remove -- from arg list
shift
# check for single final parameter
if [ $# -ne 1 ]; then
exec $vdump
fi
# check for host:device dump file
echo $file | $tr ':' ' ' | read host device
if [ "$device" = "" ]; then # do local device backup
# run the dump command
$vdump $level $args -b $bs -f $file $1
else # do remote device backup
# check for user_at_host
echo $host | $tr '_at_' ' ' | read user host
if [ "$host" = "" ]; then
host=$user
user=""
fi
# add -l flag for `rsh' if a username was specified
if [ "$user" != "" ]; then
user="-l $user"
fi
# run the dump command
$vdump $level $args -b $bs -f - $1 | $rsh $host $user $dd of=$device bs=${bs}k
fi
--- end script 'rvdump' ---
Thanks to the following for their replies:
Gyula Szokoly <mailto:szgyula_at_skysrv.Pha.Jhu.EDU>
Sean O'Connell <mailto:sto_at_stat.Duke.EDU>
Cliff Krieger "BigRedDog" <mailto:ckrieger_at_latrade.com>
Steve Beikman <mailto:beikman_at_xtdl.com>
mailto:alan_at_nabeth.cxo.dec.com
Veselin Terzic <mailto:terzic_at_mda.ca>
Jon Craig <mailto:jcraig_at_gfs.com>
Ray Bellis <mailto:Ray.Bellis_at_community.co.uk>
Brian Sherwood <mailto:sherwood_at_esu.edu>
--
Karl Marble
Unix Administrator & Webmaster
City of Worcester Information Services
Worcester, MA
mailto:marblek_at_city.ci.worcester.ma.us
http://www.ultranet.com/~kmarble (My 'at-work' page isn't finished yet)
Received on Mon Nov 04 1996 - 15:35:07 NZDT