[comp.unix.questions] Unattended dumps

nispa@hutcs.hut.fi (Tapani Lindgren) (12/04/87)

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