Re: Database Backup
Posted in 1992
Topics: General Discussion
>
>
> Hello,
>
> I am using INFORMIX-ONLINE 4.1 and I need to be able to back up
> my databases at night using one tape drive.
>
> Now for the qustion... How doe I do automatic backups using
> only one tape drive.
>
> THanks
> Mike Barnes
> (404) 810-4197
>
>
Hi Mike!
I don't know what kind of tape drive you have. But here is a solution
that we put in place.
We have a 2.3 GB DAT drive that is used to back up all our file systems
on disk. To overcome the problem with the online slice being left out,
we modified the tbconfig parameter "TAPEDEV" to point to a flat file
on the file system as shown below.
********************* CUT HERE *************************************
# System Archive Tape Device
TAPEDEV /usr/bkups/ONLINESLICE # Tape device path
TAPEBLK 16 # Tape block size (Kbytes)
TAPESIZE 10240 # Maximum amount of data to put on tape (Kbytes)
********************* CUT HERE *************************************
The only catch is you have to create a dummy file before you create a
backup of the online slice.
********************* CUT HERE *************************************
cp /dev/null /usr/bkups/ONLINESLICE
chown informix /usr/bkups/ONLINESLICE
chgrp informix /usr/bkups/ONLINESLICE
chmod 660 /usr/bkups/ONLINESLICE
********************* CUT HERE *************************************
To automatically dump the online slice, we use the following scenario.
********************* CUT HERE *************************************
#!/bin/sh
# FILE: bkup_online
# Author: Raj Muralidharan
#
INFORMIXDIR=/usr/informix4.1
PATH=$PATH:$INFORMIXDIR/binSQLEXEC=$INFORMIXDIR/lib/sqlturbo
export INFORMIXDIR PATH SQLEXEC
# Force a check point and bring informix online to quiescent mode.
# If informix cannot/should not be brought down to quiescent mode, then
# use the line without the -u flag and comment out the other.
#
# tbmode -cuy
tbmode -cy
#
# Now do a backup of the online system. The '0' indicates a complete
# backup. The <CR> alone on the first line is necessary to respond
# to one of the prompts from tbtape.
#
tbtape -s <<_EOF_
0
_EOF_
#
# Bring Informix into on-line mode if it is in a quiescent state. Comment
# out the next line if necessary.
# tbmode -my
********************* CUT HERE *************************************
The above script is run from cron using the following statement:
********************* CUT HERE *************************************
00 21 * * * /bin/su informix -c "/usr/lbin/bkup_online"
********************* CUT HERE *************************************
Hope this helps. We have not had a single problem to date with this
procedure.
Raj.
--
=**= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =**=
Raj Muralidharan | Voice : (301) 989-5042
Bell Atlantic Information Systems | Fax : (301) 989-5040
2221-L Broadbirch Drive | Internet : ddntswa@bell-atl.com
Silver Spring, MD 20904-1985 | UUCP : bell-atl.com!ddntswa
=**= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =**=