Onbar
Posted in 2000
Topics: Backup & Restore, Logging & Checkpoints
Hi !
We are using Omniback for Logical log backup. We have had many drive
failures. I've been thinking if there would be some onbar parameter that
logical log backup is done after 10 full logs ???.
-Jukka
Hello,
one solution is to use ALARMPROGRAM. It is called just after every
log-switch. You can query how many logfiles are full and if it's more than
10 you can start a logical log backup.
A simple example:
#
--------------------------------------------------------------------------------------------------------------
. /home/informix/.dbenv_P12 # Set environment
LOG_FULL_NR=10 # Set your limit here
PROG=`basename $0`
USER_LIST=informix
BACKUP_CMD="onbar -l -c"
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
LOG_FILLED=`onstat -l | grep "U--" | wc -l` # Query
of how many logs being full
if [ $LOG_FILLED -ge $LOG_FULL_NR ]
then
$BACKUP_CMD 2>&1 >> /dev/null
EXIT_STATUS=$?
fi
esac
exit $EXIT_STATUS
#
--------------------------------------------------------------------------------------------------------------
Regards
Peter
--
Peter Dzvonyar
SAP-Consultant R/3 BC
_______________________________________________________________
email: Peter.Dzvonyar@ops.de p.dzvonyar@t-online.de
_______________________________________________________________
Hi, the script is however from my colleague, Mr. Klaus Mueller. He is a funny guy and he has claimed because I haven't mentioned his name. This should be the official contribution. And something else: he says the script should be called: muell.sh. ( "Muell" means in German garbage.) :-)) Regards Peter -- Peter Dzvonyar SAP-Consultant R/3 BC _______________________________________________________________ email: Peter.Dzvonyar@ops.de p.dzvonyar@t-online.de _______________________________________________________________