RE: ontape within a script
Posted in 1998
Topics: Backup & Restore, Installation, Setup & Upgrades
Neil, what we do here is to put in the following BEFORE running the =
script:
=20
# Check that there is a tape inserted...
=20
mt -f /dev/rmt/3l rewind
if [ $? -ne 0 ] ; then
echo "No tape inserted, backup cancelled." > TBTAPE.log
exit 1
fi
Also, we have a job that runs at 4PM (so as to make sure there will be =
someone available to insert a tape) to check whether a backup tape is =
installed (we run unattended backup at 11PM):
# Check that there is a tape inserted...
=20
mt -f /dev/rmt/3l rewind
if [ $? -ne 0 ] ; then
mailx -s "WARNING: No backup tape inserted" isgroup < /dev/null
fi
Hope this helps.
----------
From: Neil.Truby@rmy.emory.edu[SMTP:Neil.Truby@rmy.emory.edu]
Sent: Thursday, 22 January 1998 21:20
To: informix-list@rmy.emory.edu
Subject: ontape within a script
Apologies first of all; I've seen this question posted before, but I =
can't find
the answer in any archives.
When running an ontape -s, if the tape is not ready, the message to =
prepare the
tape will be repeated. Within a script, this will simply start a tight =
loop
which will quickly fill up the script logfile's file system.
I've seen a technique described which limits the number of re-tries to a =
finite
number, say 10 or 100. Can anyone remind me how to do this?
Thanks
Neil Truby
Chase Manhattan Bank
Bournemouth, UK
neil.truby@chase.com