RE: ontape -s to disk
Posted in 2004
Gene Sais wrote
>Rather than re-invent the wheel, does anyone have a script that will
backup
>an Informix db to disk using ontape?
This is one that works for me and compresses on the fly. To restore,
unzip the file first, and then do normal ontape -r. ( It backs up an
instance rather than a database)
# ontape backup# TAPEDEV should be set to OTFILENAME
# $1 is parameter passed to script of date & other info for file name,
ie 20041231-live
OUTF=OT$1.zip
cd /usr/informix/export2/ontape
mknod OTFILENAME p # used first time round only
touch $OUTF
chmod 660 OTFILENAME
chmod 660 $OUTF
/usr/ixbin/utils/zip < OTFILENAME > $OUTF & # path of compress program
echo '0\\n\\n' | ontape -s
echo "End OnTape "`date`
Colin Bull
_______________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs Email
Security System.
_______________________________________________________________________
sending to informix-list