home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!sun-barr!ames!agate!boulder!khonshu!ejh
- From: ejh@khonshu.colorado.edu (Edward J. Hartnett)
- Subject: dump script rewinds tape - why?
- Message-ID: <1992Jul30.184702.7838@colorado.edu>
- Summary: I don't want this to rewind the tape after it's done
- Sender: news@colorado.edu (The Daily Planet)
- Nntp-Posting-Host: khonshu.colorado.edu
- Organization: Cooperative Institute for Research in the Environmental Sciences
- Date: Thu, 30 Jul 1992 18:47:02 GMT
- Lines: 47
-
- This is my incremental dump. I would like to have a week's incremental
- dumps on one tape, which I can then leave in there all week. Right now
- it rewrites over the backup of the day before (i.e. it rewinds the tape
- after backups). But why?
-
- Ed Hartnett
- ejh@khonshu.colorado.edu
-
- #!/bin/sh
- # narrow PATH to trusted dirs
- PATH=/usr/ucb:/usr/bin:/usr/etc
- # prevent logins during dump
- cp /usr/local/etc/nologin /etc/nologin
- # will need this later when turning net back on
- # warn the unlucky folks already logged in
- /usr/bin/wall <<FOOBAR
- Incremental dumps will begin in about 5 minutes. If you are accessing a file
- at the same time as dump, that file could be scrogged on the backup, possibly
- in your directory on disk, and it is possible that the entire dump could be
- scrogged. Performance will be lousy anyway, so either log out or wait
- patiently for about ten to fifteen minutes or so without typing commands.
- If you are remotely logged in, the net connection will be disabled during
- the dump which should log you off anyway. -The Management
-
- PS - You're really working too late anyway. Why don't you get a little rest.
- This isn't brain surgery, you know, it can probably wait!
- FOOBAR
- # give them their 300 seconds
- /usr/bin/sleep 300
- HOSTNAME=`/usr/bin/hostname` export HOSTNAME
- # turn net off to prevent incoming mail, rlogins, rshs, and anything else
- # that might disturb the dump
- ifconfig le0 down
- # rm -fr /tmp/*
- /usr/etc/dump 5ubdsf 100 6000 54000 /dev/nrst0 /dev/rsd0a
- /usr/etc/dump 5ubdsf 100 6000 54000 /dev/nrst0 /dev/rsd0g
- /usr/etc/dump 5ubdsf 100 6000 54000 /dev/nrst0 /dev/rsd0h
- # this ensures the tape can't be accidentally overwritten before it is removed
- #/usr/bin/mt -f /dev/rst0 offline
- # re-enable logins
- rm /etc/nologin
- # resume connection with the net
- ifconfig le0 $HOSTNAME netmask 0xffffff00 broadcast 128.138.0.0 -trailers up
- /usr/bin/wall <<RABOOF
- The incremental dumps are now complete. You may resume your work. Thank you
- for your cooperation. -The Management
- RABOOF
-