Looking for shell script for backup on BSD 4.3
Daniel A. Graifer
dag at fciva.FRANKLIN.COM
Sun Oct 14 07:08:38 AEST 1990
I have written a sequence of scripts we use here to get the system into an
assured idle state for unattended backup. These depend on init state 4 being
available for local site use (We are running Prime Computer's port of AT&T
SYSV 3.1.2). The sequence of events is as follows:
/etc/bupstart runs out of crontab at 6:00am
checks for presence of tape in Excebyte drive, and that tape
appears different from last backup tape written (In case
you forget to change the tape!)
broadcasts a warning message
writes backup paramenters ( complete/incremental, device,
logfilename, filesystemnames ) to /etc/ustate4.rc
does a telinit 4
init looks in inittab to get instructions for changing to state 4.
entry for /etc/rc0 now has a 4, so system services are shut down.
(This is the same as doing a telint 0 or 1 or S)
new script /etc/rc4, similar to rc2, runs scripts in /etc/rc4.d
remount file systems
read /etc/ustate4.rc and start /etc/autobackup
autobackup does the backup (we use /etc/savecpio) and
moves ustate4.rc to /etc/backup.done
do an init 2
respawn a getty on the console so a failure of the init 2 will
not leave the system irretrievably hung.
init looks in inittab for instructions on returning to multiuser state.
new script S99autotapelog in rc2.d looks for /etc/backup.done, and
if it is there, does spawns off /etc/autotapelog
This does a cpio -ivtB <$DEVICE >$LOGFILE to verify the
readability of the tape.
Removes /etc/backup.done
This should give you enough clues to write your own, or send me email and I
will mail you mine.
Dan
---
Coastal Capital Funding Corp 7900 Westpark Drive, Suite A130
(703)821-3244 McLean, VA 22102
uunet!fciva!dag
--
Daniel A. Graifer Franklin Mortgage Capital Corporation
uunet!dag at fmccva.franklin.com 7900 Westpark Drive, Suite A130
(703)448-3300 McLean, VA 22102
More information about the Comp.unix.admin
mailing list