Automatic unattended execution of 'dump' ?

Marcus J. Ranum mjranum at gouldsd.UUCP
Sun Sep 14 22:33:28 AEST 1986


In article <128 at morgoth.UUCP>, glidden at 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.

	Um, how about something cheesy like this: 
1)create /etc/nologin.
2)log out your users (for a in `ps -ag | sed /root/d | awk print{$1} `;do
	kill -9 $a; done     or something equally sleazy
3)run dump
4)remove /etc/nologin
5)voila
	to prevent crontab processes from fiddling with the disks, make
sure your crontab is corretly tuned.

  I have a set of shell scripts that do this in a rather more sophisticated
manner, but I can't send 'em to you.  You might want to trap exit statuses,
and print results, etc, etc...   Since you have a relatively small system,
really think the best way to solve your problem is to just do everything in
a simple shell script.

Live Free
mjr
-- 
 
I raised my knife to it:
Some fresh young morning-glory
As we too, alas...



More information about the Comp.unix.wizards mailing list