Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ontape via Cronjob

91 views
Skip to first unread message

Aaron Herskowitz

unread,
Sep 22, 1997, 3:00:00 AM9/22/97
to

We run Informix On-Line Dynamic Server 7.22. We currently run archives
via "ontape -s -L 0" *manually* on a daily basis on several servers. I
would like to automate this process so that we can just create a script
with the command, and run it via cron at night (loading a new tape each
day).

I have tested a few ways of doing this, but I get stuck at the:

Please mount tape 1 on /dev/rmt/1 and press Return to continue
...

We have a shell script that does the "ontape -a" that uses a command
line of

(echo "\n"; echo "n\n") | ontape -a

to get past the same message, but for some reason this doesn't work with
"ontape -s".

Any help would be greatly appreciated. Please send responses directly
to me at mailto:aa...@intraware.com and I will post a summary.

Thanks,
Aaron
--
Aaron Herskowitz Mailto:aa...@intraware.com
Systems Engineer Voice:510-253-4566
intraware Inc. Fax:510-253-4599
Send XL T-Shirts to 25 Orinda Way, Orinda, CA 94563
http://www.intraware.com

Ruediger Papke

unread,
Sep 23, 1997, 3:00:00 AM9/23/97
to Aaron Herskowitz
Short Time -> Short Answer
Please try this script:
ontape -s -L 0 << EOF

EOF

This is a Here-script. The second (empty) line stands for the RETURN
after "Please mount tape ... and press Return to continue...".
Hope this helps.
Best regards
Ruediger

Rs

unread,
Sep 27, 1997, 3:00:00 AM9/27/97
to

Or you can try this :

echo "
" | ontape -s -L 0

The characters after the first " is not just the RETURN key. It is
ctrl-v ( meaning raw character ), and then ctrl-j ( for new line ).
this gives the <RETURN> sequence needed by ontape. it worked for
me all the time.

Ruediger Papke (Ruedige...@t-online.de) wrote:

Nils Myklebust

unread,
Sep 27, 1997, 3:00:00 AM9/27/97
to

Unfortunately you have been given answers that will work most of the
time, but can give you some serious trouble. As far as I know you may
get some growing temporary files and an ontape command that is never
terminated if there ever is a problem with the tape. Se further below.

:Aaron Herskowitz wrote:
...snip...
:> We have a shell script that does the "ontape -a" that uses a command


:> line of
:>
:> (echo "\n"; echo "n\n") | ontape -a
:>
:> to get past the same message, but for some reason this doesn't work with
:> "ontape -s".

Ruedige...@t-online.de (Ruediger Papke) wrote:

:Short Time -> Short Answer


:Please try this script:
:ontape -s -L 0 << EOF
:
:EOF
:
:This is a Here-script. The second (empty) line stands for the RETURN
:after "Please mount tape ... and press Return to continue...".

rs...@bcg.bad.com (Rs) wrote in another responce:

:Or you can try this :


:
:echo "
:" | ontape -s -L 0
:
:The characters after the first " is not just the RETURN key. It is
:ctrl-v ( meaning raw character ), and then ctrl-j ( for new line ).
:this gives the <RETURN> sequence needed by ontape. it worked for
:me all the time.

But in the excelent faq at http://www.iiug.org we find:

8.4 How can I run ontape/tbtape from a cron job?

echo '\n0' | tbtape -s 1 | head -100

The head cuts things off when tbtape gets into the infinite
"insert a tape and press any key to continue" thing. I have found that
normal output is well less than 100 lines. This
trick also seems to kill off the loose tbtape process too - but
I'm not sure why. Of course, YMMV.

By Martin Andrews (and...@ccfadm.eeg.ccf.org)

Note that recent releases of Informix engines have renamed the "tb*"
utilities to "on*"

The faq is allways a smart place to look.


Nils.My...@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

0 new messages