Carefull.
The method used by Simon Barber (se below) doesn't allways work.
Here's an excerpt from the faq (by Martin Andrews
andrewm@ccfadm.eeg.ccf.org):
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.
One should allways read the excelent faq.
Simon Barber <beaker@century.demon.co.uk> wrote:
:Providing you can guarantee all the data will fit onto a single tape,
:the ontape can be run from a script. The following example has run fine
:on Informix V6 and V7 systems on HP-UX 9.04 and 10.10, run from Cron:
:
:#!/bin/ksh
:export INFORMIXDIR=/opt/informix
:export INFORMIXSERVER=....
:export ONCONFIG=....
:export PATH=$INFORMIXDIR/bin:$PATH
:
:ontape -s -L 0 <<EOF
:
:EOF
:RC=$?
:
:exit $RC
:
:Note: the blank line before the EOF symbol will EOB the tape prompt!
:
:We now use a DLT tape drive, it's faster than DAT/Exabyte, more reliable
:and can now store a massive 40Gb (after compression) on a tape.
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