Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I configure the Logical log backup

Status
Not open for further replies.

fredericlemaire

IS-IT--Management
Dec 2, 2002
2
BE
Hello,

How Can I configure informix to backup his logical log to disk or rdisk ? For the moment, the default logical log location is /dev/null but I want to have a copy of all logical logs on a disk . Can you help me ? I already tried to configure it without success...

We are working with IDS 7.31 UC2A on Aix 4.2

Thank you.

Frédéric
 
Frederic:

If you are trying to write Logical Logs to a raw device, Informix doesn't support that. If you aren't going to use a tape device, you can write LLs to a disk file, but the file has to exist and user informix should own it and have read/write permissions.

Of course, you have the further maintenance headache of cleaning up the LL file once an archive-0 is performed.

Regards,

Ed
 
Thank you for your answer. I already tried it and it worked but I have more than one LL for a day and each time a logical log is full and backed-up, the previous LL is destroyed and a new on is created with the same name as describe in my onconfig file.What I want to do is to keep all the logical logs so that I can restore efficently. How can I do that ? with a script ?
Thank you.

Frédéric


 
Here is a small script that we use

# Backup Informix Logical Logs to disk file

export INFORMIXDIR=
export PATH=
export TERMCAP=
export INFORMIXTERM=
export TERM=
export INFORMIXSERVER=
export ONCONFIG=
export DBSPACETEMP=

CONS="/dev/console"
BACKDIR="/backup"
LOGFILE="$BACKDIR/LOG/`date +%b%d%H%M`.log"
cat /dev/null > $LOGFILE
SleepTime=60

dsply_msg()
{
echo $1 | tee -a $LOGFILE >$CONS 2>&1
}

dsply_msg "\tStarting Logical Log Backup at `date +"%H:%M:%S"`"

#
# Execute the Logical Logs Backup
#
su - informix -c &quot;ontape -a <<+
\012
y
\012
+&quot; | tee -a $LOGFILE >$CONS 2>&1

mv /archive/informix_backup/ll /archive/informix_backup/ll.`date +%m%d%H%M`
gzip /archive/informix_backup/ll.`date +%m%d%H%M`
>/archive/informix_backup/ll # Create empty ll file
chmod 666 /archive/informix_backup/ll
chown informix:informix /archive/informix_backup/ll

dsply_msg &quot;\tFinished Logical Log Backups at `date +&quot;%H:%M:%S&quot;`\n&quot;














 
Other solution is to use onbar with ISM instead of ontape.

Be careful with the previous message because in case of
logical restore, you will need to perform a lot of tasks :
unzip, copy, unzip, copy ... for the GOOD files.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top