How can a script reliably tell whether ontape failed?
Posted in 1995
We use a script to run backups, and are having problems with the fact
that ontape's exit status is not reliable: sometimes it exits with
status 0 even though the backups failed. We worked around this by
having our script look for the string "Please label this tape as
number" in ontape's output: if that string was absent, the script
assumed that ontape failed.
This seemed to work fairly well until ontape decided not to output
that string even when backups ran fine. This puts us in a quandary.
We would like a reliable way of knowing whether backups succeeded.
Informix support cannot help here because using a script to run
backups is not recommended. (Like they really expect an operator to
sit at the console and hit return once in a while.) They also do not
seem to think that ontape's unreliable exit status is a bug that's
worth fixing quickly.
Configuration: Informix 6.0, Solaris 2.4, Sun Sparc 10. We dump to
stdout, and use rsh to transfer the data over the network to the
backup host that has the tape. We have fooled ontape into thinking
that it's dumping to a tape by having onconfig's TAPEDEV value name a
symbolic link to /dev/fd/1. A terrible hack, I know, but we have to
do backups somehow; backing up to disk is not feasible because that
would double our application's disk space requirements, and we had to
fit in an already existing backup regime that also allows various other
(non-Informix) backup utilities the opportunity to append to a single tape.
--
--
Burzin N. Engineer |Tel. (310) 524 1800 | email: burzin@twinsun.com
Twin Sun Inc. |Fax. (310) 524 1818 | MIME OkaY!