Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    Virginia
    Posts
    11

    Question Unanswered: 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?

  2. #2
    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

  3. #3
    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...

  4. #4
    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

    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

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

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •