home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.ultrix:9046 comp.unix.admin:6756
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!ra!wintermute.phys.psu.edu!leps5.phys.psu.edu!kenh
- From: kenh@leps5.phys.psu.edu (Ken Hornstein)
- Newsgroups: comp.unix.ultrix,comp.unix.admin
- Subject: Re: Backup procedure sought
- Date: 22 Dec 1992 21:58:03 GMT
- Organization: Penn State, Laboratory for Elementary Particle Science
- Lines: 30
- Message-ID: <1h831bINNmnk@wintermute.phys.psu.edu>
- References: <1992Dec22.145720.1684@dd.dk> <1992Dec22.202405.6087@nntpd2.cxo.dec.com>
- Nntp-Posting-Host: leps5.phys.psu.edu
- Keywords: Ultrix 4.3 backup dump tape date
-
- In article <1992Dec22.202405.6087@nntpd2.cxo.dec.com> alan@nabeth.enet.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.) writes:
- >2. Clue: When the transition is made from multi-user to single user, init
- > starts an sh(1). When this sh(1) starts it performs the shell commands
- > in .profile. It should be possible to replace .profile with a script
- > that unmounts the file system, runs dump and does whatever you want
- > done running single user. Then you want to replace .profile with the
- > original one and have the shell kill itself. This should transition
- > backup to multi-user. I did this once on ULTRIX V1.something when
- > I worked at the CSC. I didn't save the .profile, but it was pretty
- > easy once I figured out how to have the shell kill itself. I think
- > I just sent a signal using kill(1) to the process id $$.
-
- I do something similar, except I have root's .profile look for a magic cookie;
- that way I don't have to replace root's .profile. Here's an example (which I
- admit is not very robust):
-
- if [ -f /etc/dobackup ]; then
- echo "Performing automatic system backup"
- cp /usr/adm/backup-level0 /tmp/level0
- /etc/umount -a
- /bin/sync; /bin/sync
- /etc/fsck
- /bin/sh /tmp/level0
- rm -f /etc/dobackup /tmp/level0
- /etc/reboot
- fi
-
- You could replace the /etc/reboot in the last line with a /bin/kill $$.
-
- --Ken
-