Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.unix,net.unix-wizards,net.decus Subject: Re: Automatic unattended execution of 'dump' ? Message-ID: <3528@umcp-cs.UUCP> Date: Sun, 21-Sep-86 18:56:13 EDT Article-I.D.: umcp-cs.3528 Posted: Sun Sep 21 18:56:13 1986 Date-Received: Sun, 21-Sep-86 23:39:07 EDT References: <128@morgoth.UUCP> Reply-To: chris@umcp-cs.UUCP (Chris Torek) Organization: University of Maryland, Dept. of Computer Sci. Lines: 49 Xref: mnetor net.unix:5574 net.unix-wizards:7934 net.decus:406 In article <128@morgoth.UUCP> glidden@morgoth.UUCP (Ken A. Glidden) writes: > We have a uVAX II running Ultrix 1.2. I'd like very much to use >the crontab to start up a shell script late at night to perform >a dump. Specifically I'd like the shell script to "simulate" >single user mode by preventing any logins, killing any processes which >have the potential to alter the disk during the dump, and preventing >any processes which may alter the disk during the dump from starting >while the dump is in progress. Once finish the script should undo all >its protections and allow business as usual. Unfortunately, just about every process might alter the disk. About the only way to do this would be to kill everything, then start only trusted processes. Indeed, the easiest way to do this would be to run shutdown. If your root shell is /bin/sh, you could then put this in /.profile: PATH=/bin:/etc; export PATH if [ -f /etc/autodump ]; then sh /etc/autodump rm -f /etc/autodump exit 0 fi # rest of /.profile For /bin/csh, use set path = (/bin /etc) if (-f /etc/autodump) then sh /etc/autodump rm -f /etc/autodump exit 0 endif # rest of /.cshrc You can then have cron copy a script to /etc/autodump and run shutdown. When the machine goes to single user mode, the shell will read .profile or .cshrc and run autodump, then remove the script and exit, bringing the machine back up in multi-user mode. This, like all unattended dump schemes, can run into one problem: Dumps do not always succeed. If the dump fails, dump will attempt to get help; this too will fail, and I am not certain just what will happen after that. It should be easy enough to find out: just leave the tape drive off line and force a run. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu