[Veritas-bu] flaw in backupdb.sh from curtis
2002-02-10 09:51:32
Subject: |
[Veritas-bu] flaw in backupdb.sh from curtis |
From: |
wbreyha AT gmx DOT net (Wolfgang Breyha) |
Date: |
Sun, 10 Feb 2002 15:51:32 +0100 |
Hi!
I've found a minor flaw in backupdb.sh from Curtis with probably major
consequences. It seems his script is victim of a past change in bpdbjobs...
In the section of the script where he checks if there're some active/queued
jobs he does:
# find out how many currently queued, re-queued, or active jobs
# there are currently
while [ $TOTAL -gt 0 ] ; do
TOTAL=`bpdbjobs -report |egrep -c 'QUEUED|ACTIVE'`
[ $TOTAL -eq 0 ] && break
sleep 600
COUNT=`expr $COUNT + 1`
if [ $COUNT -gt 36 ] ; then
ERROR="Giving up after 6 hours. Could not find an inactive time to
backup the database."
Exit
fi
done
Since NB 3.4.1 bpdbjobs reports "Queued" and "Active" instead of the uppercase
version checked above the script tries to kill the request daemon bprd even if
there are active/queued jobs. The databasebackup succeeds, but it fails to
restart the request daemon afterwards since the old one is still running. This
one terminates after the last active job is finished ending up with not even
one request daemon. You'll get no backups (manuall and/or automatic) till the
script is run again without active jobs.
Change the line
TOTAL=`bpdbjobs -report |egrep -c 'QUEUED|ACTIVE'`
to
TOTAL=`bpdbjobs -report |egrep -c 'Queued|Active'`
or IMO even better to
TOTAL=`bpdbjobs -report |egrep -ci 'queued|active'`
I've reported to Curtis personally, too.
Regards, Wolfgang Breyha
--
/ Those of you who think they know everything are \
/ very annoying to those of us who do. -- Unknown \
\ Wolfgang Breyha <wbreyha AT gmx DOT net> - http://mash.nwy.at /
\ Systems Engineering UTA/netway - Vienna - Austria /
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Veritas-bu] flaw in backupdb.sh from curtis,
Wolfgang Breyha <=
|
|
|