Single user backups

Charlie Tierney - Sun San Francisco SE clt at sun.com
Thu Dec 15 20:24:55 AEST 1988


Actually the subject is performing automatic dumps in single-user mode
(through the use of shell scripts).

In fact, the write a "dot" file and check for it's presence is the best
method to accomplish your goal.  The old Fortune Systems 32:16 used to
operate in this exact way for several maintenance commands.

Let's say you want to do autodumps in single user mode.  Your dump command
starts from cron and does a:

	"touch /etc/.dump"
	"shutdown -r +5 'Dump is about to begin - you better get off.'"

Eventually, after the reboot (see shutdown(8)), you will come through the
rc scripts.  The script to muck with is /etc/rc.

In /etc/rc put in some lines that do about this:

	if test -f /etc/.dump
	then
		/etc/BACKUP
		rm /etc/.dump
	fi

On the Fortune, it was a more generic capability - all unbundled software
installed a startup/shutdown/install/delete shell script into a directory:
"/m/maint/rc".  The /etc/rc script looked at /m/maint/rc and ran each
script it found there.  Very clean, also nice to be able to deinstall
something by typing:  "/m/maint/rc/boring.rc delete'

Charlie Tierney				Sun Microsystems

Writing In No Official Capacity



More information about the Comp.sys.sun mailing list