From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,4b8a3c4f0ed90d75 X-Google-Attributes: gidfee84,public From: Ray.Bellis@psy.ox.ac.uk (Ray Bellis) Subject: Re: [Q-HELP] How remote "vdump" on DEC UNIX3.2c Date: 1996/01/26 Message-ID: #1/1 X-Deja-AN: 136498492 sender: rpb@axp01.mrc-bbc.ox.ac.uk references: 14: 31:12 GMT organization: O.U. Dept. of Experimental Psychology newsgroups: comp.unix.osf.osf1 In article haro@fclzoo.itdl.ds.boeing.com (John S. Haro) writes: > [Q1] Anyone have any info on remote "vdump" and "vrestore" for Digital > UNIX 3.2c ADVFS (Advanced File System) structure? > > DEC says there is no remote commands for these backup utils, like rdump > and rrestore. > > The only suggestion from DEC is to do via dd, eg: > > vdump -0uf /usr | rsh (tapehost) dd bs=60k of=/dev/rmt0h > > and > > rsh (tapehost) "dd if=/dev/rmt0h bs=60k" | vrestore -xvf - I announced this about six months ago on the alpha-osf-managers e-mail list but I've only ever sent it out on request to individuals. I guess this has been around long enough that people would have told me if there were any problems. I haven't written an `rvrestore' yet. --8<--8<-- cut here --8<--8<-- #!/bin/ksh # # rvdump # # vdump script which accepts `-f [[user@]host:]device' for dumping # to a remote device # # (C) R.P.Bellis 1995, Redistribute Freely # # 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 --8<--8<-- cut here --8<--8<-- -- Computing Officer, MRC Research Centre in Brain and Behaviour, Department of Experimental Psychology, Oxford University