home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.ultrix
- Path: sparky!uunet!destroyer!gatech!psuvax1!news.cc.swarthmore.edu!hirai
- From: hirai@cc.swarthmore.edu (Eiji Hirai)
- Subject: Re: automating dump on Ultrix MvaxII
- Message-ID: <M52PBCSB@cc.swarthmore.edu>
- Sender: news@cc.swarthmore.edu (USENET News System)
- Nntp-Posting-Host: gingko
- Organization: Information Services, Swarthmore College, Swarthmore, PA, USA
- References: <2313.2a94b38c@decus.ch> <1992Aug21.142153.28970@rdg.dec.com>
- Date: Fri, 4 Sep 1992 21:59:19 GMT
- Lines: 49
-
- klavins@decus.ch (Ed Klavins, Micrognosis Zurich) writes:
- > Does anyone have any useful scripts they'd like to share?
-
- Here is my super-ultra-minimalist backup script for one of my machines. We
- have an entry in /etc/crontab that executes this every weekday night at
- 1:00am. If you want to rdump, or dump multiple machines, or have multiple
- tape drives, you'll have to hack and tailor a script for your environment.
- My do-everything dump script is too site-specific to post.
-
- --
- Eiji Hirai <hirai@cc.swarthmore.edu> : : : : : :: ::: :::: :::::
- Unix Hacker for Swarthmore College : : : : : :: ::: :::: :::::
- Information Services, Swarthmore, PA, USA. Copyright 1992 by Eiji Hirai.
- I don't speak for Swarthmore College. All Rights Reserved.
-
- #!/usr/bin/sh5
- # does a dump of local disks.
- #
- # to restore:
- # mt -f /dev/nrmt4h fsf ?
- # restore if /dev/nrmt4h
-
- myname="`/usr/bin/basename $0`"
- if [ ! $# -eq 1 ]
- then
- echo "usage: $myname dump-level"
- exit 1
- fi
-
- problem='hirai'
- level="$1"
- device='/dev/nrmt4h'
- density=54000
- length=30000
- # I'm guessing length=30000 is enough for a 90 or 120 minute 8mm tape.
- # For a DAT tape, I've been using density=61000 and length=12500 for a
- # 60mt tape. -eiji
-
- if /bin/mt -f $device rewind
- then
- for partition in / /usr /var /mount1 /mount2 /mount3 /mount4
- do
- /bin/dump ${level}usdf $length $density $device $partition < /dev/null
- done
- /bin/mt -f $device rewoffl
- else
- echo 'could not rewind tape' | /usr/ucb/mail -s 'backup problem' $problem
- fi
- exit 0
-