Re: ontape -s to disk
Posted in 2004
Gene Sais wrote:
> OS: AIX 4.3.3
> IDS: 7.23
>
> Rather than re-invent the wheel, does anyone have a script that will
> backup an Informix db to disk using ontape?
I use this procedure to backup into the filesystem and later write the
file with the "regular" backup to tape:
#!/usr/bin/bash
### settings in onconfig: TAPEDEV /opt/informix/dev/tapedev
export INFORMIXDIR=/opt/informix
export INFORMIXSERVER=dbadm01
export ONCONFIG=onconfig
DATE=`date +"%d%m%Y_%H_%M_%S"`
# cd to the backup directory
cd /dbadm01a/ifmx_backup
# create the tape-file
touch tape.$DATE
chmod 660 tape.$DATE
# cd to the informix device file dir
cd /opt/informix/dev
# remove old link to tapedev
rm tapedev
# create the link to the newly created tape-file
ln -s /dbadm01a/ifmx_backup/tape.$DATE tapedev
# start the backup
echo "\\n0" | /opt/informix/bin/ontape -s -L 0
# reduce the size by gzipping the file
/usr/bin/gzip /dbadm01a/ifmx_backup/tape.$DATE
Johann
>
> Thanks,
> Gene
>
> P.S. I rather use onbar with ISM, but no $$$ :). Thanks for any
> sample scripts.
sending to informix-list