From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076341621347.tru64-unix-managers.marc@archive.invalid> From: Karl Marble Date: Mon, 04 Nov 1996 13:59:46 +0000 To: tru64-unix-managers Subject: SUMMA II: vdump to a remote host?? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076341621347 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 Sean O'Connell Cliff Krieger "BigRedDog" Steve Beikman mailto:alan@nabeth.cxo.dec.com Veselin Terzic Jon Craig Ray Bellis Brian Sherwood -- 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)