Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Posts
    4

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

  2. #2
    Join Date
    Dec 2003
    Location
    North America
    Posts
    146
    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

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

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

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

Posting Permissions

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