RE: IDS 7.31: Backing up logical logs to disk
Posted in 2000
Topics: Backup & Restore, Server Administration, Logging & Checkpoints, Migration, Import/Export & Data Conversion, Versions, Editions & End-of-Life
Richard
We use the following which results in separate files in the log directory
for each log with the log number attached to the file:
PROG=`basename $0`
USER_LIST=informix
BACKUP_CMD="onbar -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
touch /logs/scott/current
chown informix /logs/scott/current
chgrp informix /logs/scott/current
ontape -a < /home/informix/llog.txt >/dev/null 2>&1
s=$?
sleep 2
cd /logs/scott
e=`echo "$EVENT_MSG" | sed 's/Logical Log //' | sed 's/ Complete.//'`
mv current llog$e
EXIT_STATUS=$s
;;
# 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
LTAPEDEV is /logs/scott/current
llog.txt contains a couple of enter keystrokes
$e contains the log number
It creates file llog123 when log 123 is backed up etc
These files are backed up normally and purged after a couple of weeks in
this case.
MW
-----Original Message-----
From: owner-informix-list@iiug.iiug.org
[mailto:owner-informix-list@iiug.iiug.org]On Behalf Of Richard Spitz
Sent: Thursday, May 11, 2000 12:54 AM
To: informix-list@iiug.org
Subject: IDS 7.31: Backing up logical logs to disk
Hi Informixers,
currently I'm using onbar and Legato Networker to backup IDS 7.31
logical logs to tape. This works just great, however I'm afraid that
this puts too much strain on my tapes and tape drives.
My jukebox has only two Exabyte 8mm 5/10GB drives (I know, REALLY old,
but newer equipment is not in our budget), so I cannot reserve one
drive exclusively to log backup. Since there is a lot of backup
activity especially during nighttime, the tape where the logs go
to is frequently unloaded to make room for other backups. When a
log becomes full, it is then reloaded and has to be repositioned.
I use rather small logical log files (1MB), and they become full and
have to be backed up to reuse them about 5-10 times daily during
normal database activity. I am afraid that the resulting tape un- and
reloading and frequent repositioning may be harmful to my tapes and
drives.
One alternative would be to backup the logs to disk and have the
resulting files backed up with the normal daily filesystem backup.
I tried this on another system by setting the LTAPEDEV parameter
in onconfig to a filesystem file and editing the "log_full.sh"
script to use "ontape -a" as backup command. This works, but the
filesystem file is overwritten every time a log becomes full.
Of course I could copy this file away every time it gets written,
but how do I know which log number it contains? Does anyone have
a better solution for this?
BTW: I chose to use a rather small log size so the logs will get
backed up more frequently. Are there any important reasons for not
doing so?
Regards, Richard
--
+--------------------------+------------------------------------------+
| Dr. med Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de |
| EDV-Gruppe Anaesthesie | Tel : +49-89-7095-6110 |
| Klinikum Grosshadern | FAX : +49-89-7095-6420 |
| 81366 Munich, Germany | GSM : +49-172-8933578 |
+--------------------------+------------------------------------------+
Hi Murray,
If I correctly understand your script you mix onbar and ontape: onbar for backup
and ontape for logical log backup. This cannot work! Those two utilities work
with different data format, so you will not be able to restore your database!
Have you ever tested it?
Regards
Peter
--
Peter Dzvonyar
SAP-Consultant R/3 BC
_______________________________________________________________
email: Peter.Dzvonyar@ops.de p.dzvonyar@t-online.de
_______________________________________________________________