RE: ontape in cron
Posted in 1999
Here's a different approach:
Write a script that opens up an XTerm window on an operator's console, and
informs the operator that the backup is about to begin.
Once the operator responds, execute ontape -s
When the process needs the second tape, the operator will be appropriately
informed.
When the process completes, the XTerm window closes.
Bill Raper
Senior Database Administrator
Catalina Marketing
727-579-5134
Pager 727-529-8331
williamr@catmktg.com
> -----Original Message-----
> From: garyq@emcosales.com [SMTP:garyq@emcosales.com]
> Sent: Tuesday, August 31, 1999 9:36 AM
> To: informix-list@iiug.org
> Subject: Re: ontape in cron
>
> On Fri, 27 Aug 1999 12:09:33 -0400, "Art S. Kagel" <kagel@bloomberg.net>
> wrote:
>
> >No way to do it, Gustavo. Ontape is interactive and is waiting for the
> >user to enter 'y'. Hmmmm. You could redirect stdout & stdin from/to a
> >pipe which is an application that opens a window on the operators console
>
> >and displays the ontape prompt, read from stdin, and accepts a reply from
>
> >the operator on ontape's behalf and writes it to stdout. Not pretty but
> >it should be doable. To do this the cron would run your terminal proxy
> >program which would create a bidirectional pipe and start ontape on that
> >pipe (actually a pair of pipes) for you. If you do not know how to setup
>
> >such pipes look at the source for my eventalarm.c in utils3_ak in the
> IIUG
> >Software Repository. Eventalarm uses this method to manage an ontape -a
> >session.
>
> If your backup fits on one tape it's easy. Just use the here-now command
> in korn or bourne shell.
>
> Here's my script running in cron:
>
> PATH=/usr/tbin:/u/ifmx/bin:/u/informix:/bin:/etc:/usr/bin://bin:/u/bin:/us> r/loca
> l/samba/bin:.
> ONCONFIG=onconfig.emco1
> INFORMIXDIR=/u/ifmx
> INFORMIXSERVER=emco1_net
> export PATH ONCONFIG INFORMIXDIR INFORMIXSERVER
> ontape -s<<eoj> 0
>
>
> eoj
>
> The blank lines between the 0 and eoj are line feeds (enter).
>
> Gary Quiring