Xref: utzoo comp.unix.wizards:5706 comp.unix.questions:4773
Path: utzoo!mnetor!uunet!mcvax!enea!tut!santra!nispa
From: nispa@hutcs.hut.fi (Tapani Lindgren)
Newsgroups: comp.unix.wizards,comp.unix.questions
Subject: Unattended dumps (BSD4.3)
Message-ID: <9032@santra.UUCP>
Date: 4 Dec 87 15:19:19 GMT
Sender: news@santra.UUCP
Followup-To: comp.unix.wizards
Organization: Helsinki University of Technology, Finland
Lines: 28

I have encountered a problem trying to make a shell script that would
make incremental backups at nighttime without operator attendance.
The problem results from dump(8) program requiring occasional
responses from the operator through /dev/tty.  The script is
run from another script, /usr/adm/daily, under cron control and has no
controlling terminal, so it just hangs trying to read /dev/tty.  It would
be ok if dump just aborted when facing a situation that would require
operator intervention. The script should never hang in a loop under
any circumstances, because /usr/adm/daily must do other things too
and finish after a reasonable time.

Currently I have the dump script run a background subshell that sleeps for
an hour and then kills the dump script (if it still runs) and all dump
processes.  This is very complicated, however, and the watchdog process
is almost 50% of the whole script.  It is also very slow - I would
like it to stop immediately if it finds an error, report it to log file,
rewind the tape, and let /usr/adm/daily continue its work.

Has anyone out there in the Netland have any suggestions of what to do?
Can yes(1) somehow be piped to a program that reads /dev/tty?
Could dump(8) be modified to abort at errors without any questions?
What kind of unattended backup systems do you have?

---
Tapani Lindgren, Helsinki Univ. of Technology, CS dept.
INTERNET:	nispa@hutcs.hut.fi
UUCP:		mcvax!santra!hutcs!nispa
BITNET:		nispa%hutcs.UUCP@fingate.BITNET