RE: Ontape from a shell script
Posted in 1997
Topics: Backup & Restore
Here is what we do to run ontape from a script. This is run on an
HP900/G70 using UX10.01
---------------------------------------------- CUT
----------------------------------
#NAME:
# ixbkuplev0.bat - informix backup level 0
#DESCRIPTION:
# This script is called from the UNIX cron utility. It will
# create a Level 0 backup according to time set in cron. A log
# of the transaction is stored in the file $LOGDIR/ixbkuplev0.log.
#PARAMETERS:
#
#OUTPUT:
# $LOGDIR/ixbkuplev0.log.
#NOTES:
#
#FUNCTIONS:
#
#REVISIONS:
# 1.1.0 <GA> <> <0000> Changed name from infxbkup to ixbkuplev0.
# 1.0.0 <GA> <> <0000> Created Informix backup script.
#================================================================
# Set up environment
. /elite/custom/run.elite
RUNDIR=/scripts/prog/ix_bkup; export RUNDIR
LOGDIR=/elite/work/logs; export LOGDIR
date > $LOGDIR/ixbkuplev0.log
echo "" >> $LOGDIR/ixbkuplev0.log
echo "\\n\\n"|ontape -s -L 0 >> $LOGDIR/ixbkuplev0.log 2>&1
echo "" >> $LOGDIR/ixbkuplev0.log
date >> $LOGDIR/ixbkuplev0.log
elm -s "Informix backup level 0" ssilva@prestongates.com
keiths@prestongates.com < $LOGDIR/ixbkuplev0.log
---------------------------------------------- CUT
----------------------------------
Keith
keiths@prestongates.com
> -----Original Message-----
> From: Nils.Myklebust@idg.no [SMTP:Nils.Myklebust@idg.no]
> Sent: Wednesday, June 18, 1997 5:28 AM
> To: informix-list@rmy.emory.edu
> Subject: Re: Ontape from a shell script
>
> g086mnf@bomplant3.appl.ge.com ("Mr. Munaf A.Razzak") wrote:
>
> :ontape -c < /dev/null > /tmp/junk
> :This should allow to run from a script and also not ask for input.
> Obviously
> :we write the logs to disk, so there's no check for tape ....
>
> Please check the FAQ for why the above isn't good enough and how it
> should be done.
>
>
> : ----------
> :From: ilist
> :To: informix-list
> :Subject: Ontape from a shell script
> :Date: Monday, June 16, 1997 3:41PM
> :
> :Hi,
> :
> :Hey, I am sure I did this before . . . but I want to put an ontape
> in a
> :script but it keeps reading from the keyboard even after redirecting
> the
> :input from a file or here-document . . . Can I still do this in a
> :script?
> :
> :Thanks.
> :
> :Mark
>
>
> Nils.Myklebust@idg.no
> NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
> My opinions are those of my company
> The Informix FAQ is at http://www.iiug.org