#! /bin/sh # file location: /DumpAll # # D u m p A l l # # DumpAll is a Bourne shell script used to backup to tape all # the system and user files on Mufasa/Tru64 UNIX. If errors occur, a logfile # is kept. # # To retrieve files, position the tape to the beginning of the # proper filesystem and issue: # # # REVISIONS: # # 8-9-2000 Modified by Fred for New Mufasa RAID set # # 1-11-98 Frederick J. Denny # Script modified for "Mufasa" (Alpha 2100) # Added Unload tape function # # Setup local variables # # PATH=/bin:/usr/bin:/etc:/usr/ucb:/usr/ccs:/sbin:/usr/local/bin Rdev=/devices/tape/tape0 Nrdev=/devices/tape/tape0 Logfil=/tmp/backup.logfile Fsys1=/ Fsys2=/disk1 Fsys3=/usr Fsys4=/var Fsys1Level=0uf Fsys2Level=0uf Fsys3Level=0uf Fsys4Level=0uf Vdump=/sbin/vdump # # -- DumpAll Begins -- # rm -f ${Logfil} echo "`date`: DumpAll for Mufasa starting!" >> ${Logfil} # # -- Verify the tape drive is ready -- # REWIND=`mt -f ${Rdev} rew 2>&1` echo $REWIND if [ -n "${REWIND}" ]; then echo "`date`: DumpAll: tape drive ${Rdev} not ready" >> ${Logfil} exit 1 fi # # -- Backup Filesystems -- # echo "-- Starting $Fsys1 on $Nrdev --" >> ${Logfil} $Vdump $Fsys1Level - $Fsys1 2>> ${Logfil} > $Nrdev echo "--Starting $Fsys2 on $Nrdev --" >> ${Logfil} $Vdump $Fsys2Level - $Fsys2 2>> ${Logfil} > $Nrdev echo "--Starting $Fsys3 on $Nrdev --" >> ${Logfil} $Vdump $Fsys3Level - $Fsys3 2>> ${Logfil} > $Nrdev # mt -f $Rdev rew # echo "`date`: DumpAll is complete" >> ${Logfil} cd /tmp/ lp -d sepdlab backup.logfile mt -f $Rdev unload