dbTalk Databases Forums  

Automatic Log backup

comp.databases.informix comp.databases.informix


Discuss Automatic Log backup in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jeremiah
 
Posts: n/a

Default Automatic Log backup - 01-11-2011 , 04:29 PM






I read that altering the ALARMPROGRAM parameter allows for automatic
log backup. I did so but it doesn't look like my logs are being backed
up automatically.

I modified the alarmprogram.sh and used that in my parameter.

Am I missing something?

Reply With Quote
  #2  
Old   
Art Kagel
 
Posts: n/a

Default Re: Automatic Log backup - 01-11-2011 , 04:52 PM






Depends on what you put into alarmprogram.sh! Can you post the section for
trapping event code 23 (log complete)?

Art

Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art (AT) iiug (DOT) org)
Blog: http://informix-myview.blogspot.com/

Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.



On Tue, Jan 11, 2011 at 5:29 PM, Jeremiah <yogensha.sql (AT) gmail (DOT) com> wrote:

Quote:
I read that altering the ALARMPROGRAM parameter allows for automatic
log backup. I did so but it doesn't look like my logs are being backed
up automatically.

I modified the alarmprogram.sh and used that in my parameter.

Am I missing something?
_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list

Reply With Quote
  #3  
Old   
Jeremiah
 
Posts: n/a

Default Re: Automatic Log backup - 01-12-2011 , 09:15 AM



This is what's in section 23:

# LOGICAL LOG FILE COMPLETED

# onbar assumes no operator is present, so all messages are
written to the
# activity log and there shouldn't be any output, but send
everything to
# /dev/null just in case
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
Quote:
$MAILBODY
fi
;;


On Jan 11, 4:52*pm, Art Kagel <art.ka... (AT) gmail (DOT) com> wrote:
Quote:
Depends on what you put into alarmprogram.sh! *Can you post the sectionfor
trapping event code 23 (log complete)?

Art

Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (a... (AT) iiug (DOT) org)
Blog:http://informix-myview.blogspot.com/

Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, orby
inference. *Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.

On Tue, Jan 11, 2011 at 5:29 PM, Jeremiah <yogensha.... (AT) gmail (DOT) com> wrote:
I read that altering the ALARMPROGRAM parameter allows for automatic
log backup. I did so but it doesn't look like my logs are being backed
up automatically.

I modified the alarmprogram.sh and used that in my parameter.

Am I missing something?
_______________________________________________
Informix-list mailing list
Informix-l... (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list

Reply With Quote
  #4  
Old   
Jeremiah
 
Posts: n/a

Default Re: Automatic Log backup - 01-12-2011 , 09:19 AM



I think I found my problem. ALARMPROGRAM parameter was pointing to the
wrong path.

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.