* SUMMA II: vdump to a remote host??
@ 1996-11-04 13:59 Karl Marble
0 siblings, 0 replies; only message in thread
From: Karl Marble @ 1996-11-04 13:59 UTC (permalink / raw)
To: tru64-unix-managers
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@]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@host
echo $host | $tr '@' ' ' | 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@skysrv.Pha.Jhu.EDU>
Sean O'Connell <mailto:sto@stat.Duke.EDU>
Cliff Krieger "BigRedDog" <mailto:ckrieger@latrade.com>
Steve Beikman <mailto:beikman@xtdl.com>
mailto:alan@nabeth.cxo.dec.com
Veselin Terzic <mailto:terzic@mda.ca>
Jon Craig <mailto:jcraig@gfs.com>
Ray Bellis <mailto:Ray.Bellis@community.co.uk>
Brian Sherwood <mailto:sherwood@esu.edu>
--
Karl Marble
Unix Administrator & Webmaster
City of Worcester Information Services
Worcester, MA
mailto:marblek@city.ci.worcester.ma.us
http://www.ultranet.com/~kmarble (My 'at-work' page isn't finished yet)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-11-04 13:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-11-04 13:59 SUMMA II: vdump to a remote host?? Karl Marble
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox