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 > Automatic Logical Log Backup

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-20-09, 14:57
brochon brochon is offline
Registered User
 
Join Date: Aug 2009
Posts: 4
Question Automatic Logical Log Backup

I have Informix 10. I'm doing my DB archives to a TSM server using the onbar utility. I'm trying to get my logical logs to backup automatically. In the onconfig file I've set the ALARMPROGRAM to log_full.sh Below is the log_full script. Anybody have any ideas as to what I'm not doing? Thanks in advance for any replies.

PROG=`basename $0`
USER_LIST=informix
BACKUP_CMD="onbar -b -l"
EXIT_STATUS=0

EVENT_SEVERITY=$1
EVENT_CLASS=$2
EVENT_MSG="$3"
EVENT_ADD_TEXT="$4"
EVENT_FILE="$5"

case "$EVENT_CLASS" in
23)
# 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
$BACKUP_CMD 2>&1 >> /tmp/burtbar
EXIT_STATUS=$?
;;

# One program is shared by all event alarms. If this ever gets expanded to
# handle more than just archive events, uncomment the following:
*)
# EXIT_STATUS=1
;;
esac

exit $EXIT_STATUS
Reply With Quote
  #2 (permalink)  
Old 08-21-09, 10:40
mjldba mjldba is offline
Registered User
 
Join Date: Dec 2003
Location: North America
Posts: 139
I'm not familiar with the onbar utility but perhaps this may help you resolve your problem.

I use ontape for performing backups and I have to have a separate device used for continuous logging defined in the onconfig file, in my case that's /dev/rmt0, and I have to execute ontape -c to backup the logical logs as they fill.

ontape -c will keep the device open and write logs to that tape device with no rewind until the I stop the continuous logging process with a control-C
Reply With Quote
  #3 (permalink)  
Old 08-22-09, 12:17
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Jundiai / SP - Brasil
Posts: 311
Do you restart the database?

include in the first line of log_full.sh :
Code:
exec >/tmp/log.log_full 2>&1 
set -x
echo $0 $*
Force to next logical log with "onmode -l" and monitor the log of database (onstat -m) and the file /tmp/log.log_full

check all logs and look for any error or misbehavior.
__________________
________________________________________
César Inacio Martins
Jundiai / SP - Brasil
http://www.imartins.com.br/informix - em Português
http://www.imartins.com.br/informix - English (translated by Google).
________________________________________
Reply With Quote
  #4 (permalink)  
Old 08-28-09, 10:39
brochon brochon is offline
Registered User
 
Join Date: Aug 2009
Posts: 4
Thank you ceinma. I thought I restarted the database after I made the config change, but I double checked and I hadn't. So I did a restart and now it's working as expected.
Reply With Quote
  #5 (permalink)  
Old 08-28-09, 11:01
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Hi,

I think that you must declare environment variables of TSM into $INFORMIXDIR/etc/alarmprogram.sh.

Gustavo.
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