Re: ontape failures
Posted in 1998
I don't know if it's been fixed in newer versions of IDS but here's what
I do in
my Unix shell script that does unattended backups (the whole archive
always fits
on a single tape):
echo "Informix Online backup starting - `date`." | tee $CONSOLE
ontape -s -L 0 >$CONSOLE 2>&1 </dev/null
ONTAPE_RC=$?
echo "Informix Online backup done - `date`." | tee $CONSOLE
echo "
***
******************************************************************************
***
*** Check $CONSOLE for any error messages during Informix Online backup.
***
******************************************************************************
***
"
#
# Note that return code from ontape is not reliable so operator should
# always check $CONSOLE for error messages.
#
[ $ONTAPE_RC -eq 0 ] || Quit 1 "Unable to backup Online server to
tape."
I hope that helps.
Guy
Neil Truby wrote:
>
> ontape -s / ontape -r seems to give a zero return code irrespective of> whether it's worked or not. Does anyone have any tips for checking
> success or otherwise from wothin a script?
>
> Thanks
>
> Neil
> neil.truby@chase.com