If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Continouos backup not working?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-16-05, 08:58
mrallgood mrallgood is offline
Registered User
 
Join Date: Mar 2004
Location: Virginia
Posts: 11
Question Continouos backup not working?

Hello,

We have set up all of our instances to have continouos backups of the logs. However, the backups seem to discontinue themselves and we are at wit's end trying to figure out why.

We have BACKUPLOGS=Y in our alarmprogram.sh and even when we issue nohup onbar -b -l -C &, it backs up the logs that need to be and then disappears...are we missing something?
Reply With Quote
  #2 (permalink)  
Old 02-16-05, 13:48
RobP RobP is offline
Registered User
 
Join Date: Mar 2004
Location: Netherlands
Posts: 183
Hi,

I've never used the C option before. But what we normally do is setup the alarm program so that whenever a logical log is full (code 23) the onbar process is fired (onbar -b -l), it backups all logs that are not backed up and stops. When the next log fills, the process is repeated. The good thing regarding this implementation is that the onbar process is not running all the time, but only when necessary. Normally the log_full.sh script is almost completely setup to do this task.

Hope this helps,

Rob
Reply With Quote
  #3 (permalink)  
Old 02-17-05, 07:40
mrallgood mrallgood is offline
Registered User
 
Join Date: Mar 2004
Location: Virginia
Posts: 11
Quote:
Originally Posted by RobP
Hi,

I've never used the C option before. But what we normally do is setup the alarm program so that whenever a logical log is full (code 23) the onbar process is fired (onbar -b -l), it backups all logs that are not backed up and stops. When the next log fills, the process is repeated. The good thing regarding this implementation is that the onbar process is not running all the time, but only when necessary. Normally the log_full.sh script is almost completely setup to do this task.

Hope this helps,

Rob
Hey Rob,

We have that set up, but for some reason, it just isn't doing it. Everything else is running fine except for backing up the logs...
Reply With Quote
  #4 (permalink)  
Old 02-17-05, 14:08
mrallgood mrallgood is offline
Registered User
 
Join Date: Mar 2004
Location: Virginia
Posts: 11
Talking

I figured it out....had to comment out a bunch of confusing logic in alarmprograms.sh for error 23.

Instead of

Quote:
printf "Subject: $INFORMIXSERVER : $EVENT_SEVERITY_NAME : $EVENT_MSG\n" >> $MAILHEAD
printf "$EVENT_ADD_TEXT\n" >> $MAILBODY

# TO IMPLEMENT LATER
# If there is already a logical log backup don't launch onbar again.
if ( `test x${BACKUPLOGS} = xY` ) then
$BACKUP_CMD 2>&1 >> /dev/null
EXIT_STATUS=$?
printf " '$BACKUP_CMD' has been executed and returned CODE=%s\n\n" $EXIT_STATUS >> $MAILBODY
else
echo "Script will not backup the logical logs."
fi

# Now check if the logs are near to fill up
NUMLOGUB=`$ONSTATCMD -l | grep U-B | wc -l`
NUMLOGF=`$ONSTATCMD -l | grep F- | wc -l`
NUMLOGA=`$ONSTATCMD -l | grep A- | wc -l`
NUMLOGU=`$ONSTATCMD -l | grep U- | wc -l`
NUMLOG=`expr $NUMLOGU + $NUMLOGA + $NUMLOGF`
PERC=`expr \( 100 \* \( $NUMLOGUB + $NUMLOGF + $NUMLOGA \) \) / $NUMLOG `

if ( `test $PERC -le 10` ) then
PERC=`expr 100 - $PERC`
printf "\n-------------------------------------\n\n" >> $MAILBODY
printf "WARNING : MORE THAN 90 PERCENT (%s percent) OF THE LOGICAL LOGS ARE FULL\n" $PERC >> $MAILBODY
printf " A LOGICAL LOG BACKUP IS NEEDED. SEE INFO BELOW\n" >> $MAILBODY
$ONSTATCMD -l | grep -v Blocked: | grep -v Block: | tail +4 >> $MAILBODY
fi

I changed it to

Quote:
$BACKUP_CMD 2>&1 >> /dev/null
EXIT_STATUS=$?

Works like a champ now! Thanks Rob for pointing me in the right direction!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On