home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / ultrix / 6708 < prev    next >
Encoding:
Text File  |  1992-09-07  |  2.0 KB  |  62 lines

  1. Newsgroups: comp.unix.ultrix
  2. Path: sparky!uunet!destroyer!gatech!psuvax1!news.cc.swarthmore.edu!hirai
  3. From: hirai@cc.swarthmore.edu (Eiji Hirai)
  4. Subject: Re: automating dump on Ultrix MvaxII
  5. Message-ID: <M52PBCSB@cc.swarthmore.edu>
  6. Sender: news@cc.swarthmore.edu (USENET News System)
  7. Nntp-Posting-Host: gingko
  8. Organization: Information Services, Swarthmore College, Swarthmore, PA, USA
  9. References: <2313.2a94b38c@decus.ch> <1992Aug21.142153.28970@rdg.dec.com>
  10. Date: Fri, 4 Sep 1992 21:59:19 GMT
  11. Lines: 49
  12.  
  13. klavins@decus.ch (Ed Klavins, Micrognosis Zurich) writes:
  14. > Does anyone have any useful scripts they'd like to share?
  15.  
  16. Here is my super-ultra-minimalist backup script for one of my machines.  We
  17. have an entry in /etc/crontab that executes this every weekday night at
  18. 1:00am.  If you want to rdump, or dump multiple machines, or have multiple
  19. tape drives, you'll have to hack and tailor a script for your environment.
  20. My do-everything dump script is too site-specific to post.
  21.  
  22. --
  23. Eiji Hirai <hirai@cc.swarthmore.edu>    :     :    :   :  : :: ::: :::: :::::
  24. Unix Hacker for Swarthmore College      :     :    :   :  : :: ::: :::: :::::
  25. Information Services, Swarthmore, PA, USA.      Copyright 1992 by Eiji Hirai.
  26. I don't speak for Swarthmore College.                    All Rights Reserved.
  27.  
  28. #!/usr/bin/sh5
  29. # does a dump of local disks.
  30. #
  31. # to restore:
  32. # mt -f /dev/nrmt4h fsf ?
  33. # restore if /dev/nrmt4h
  34.  
  35. myname="`/usr/bin/basename $0`"
  36. if [ ! $# -eq 1 ]
  37. then
  38.     echo "usage: $myname dump-level"
  39.     exit 1
  40. fi
  41.  
  42. problem='hirai'
  43. level="$1"
  44. device='/dev/nrmt4h'
  45. density=54000
  46. length=30000
  47. # I'm guessing length=30000 is enough for a 90 or 120 minute 8mm tape.
  48. # For a DAT tape, I've been using density=61000 and length=12500 for a
  49. # 60mt tape.  -eiji
  50.  
  51. if /bin/mt -f $device rewind
  52. then
  53.     for partition in / /usr /var /mount1 /mount2 /mount3 /mount4
  54.     do
  55.         /bin/dump ${level}usdf $length $density $device $partition < /dev/null
  56.     done
  57.     /bin/mt -f $device rewoffl
  58. else
  59.     echo 'could not rewind tape' | /usr/ucb/mail -s 'backup problem' $problem
  60. fi
  61. exit 0
  62.