ADSM-L

Re: Tracking Backup success or failures

1997-09-11 17:30:54
Subject: Re: Tracking Backup success or failures
From: Richard L Shepherd <richards AT WAIKATO.AC DOT NZ>
Date: Fri, 12 Sep 1997 09:30:54 +1200
On Thu, 11 Sep 1997, Jerry Lawson wrote:

> Date:     September 11, 1997            Time: 2:25 PM
> From:     Jerry Lawson
>           The Hartford Insurance Group
> (860)  547-2960          jlawson AT thehartford DOT com
> -----------------------------------------------------------------------------
> fancy - not using SQL Backtrack or Oracle's EBU.  They either do a full
> backup when Oracle is down, or use the Hot backup features of Oracle to
> create files of changed records that are then backed up.  All of this is run
> via KRON scripts, instead of through ADSM's scheduler.

Same here.

> Everyone was cool with this setup until one enthusiastic DBA wanted to know
> how we would notify people when a backup didn't work on the weekend.  I had
> to admit that she had me at a loss.  Legato apparently displays console
> messages that the operations people can find and warn people that something
> didn't work.  I would think that it seems reasonable to be able to write a
> script of some sort to parse the log and look for "error" indications, but I
> don't know if this is the best approach, or if indeed anyone else has done
> it.  Can people who are doing similar things share their experiences here?

Jerry, I'm new to this group, but I think we are doing what you're talking
about here.  Each night I have our unix clients launch dsmc from cron
(rather than using the scheduler) and then mail there output to one
machine which has a simple filter running over these logs grep-ing for
"failed".  Actually, here's my script at the CLIENT end:

#!/bin/bash
# Do the backup
echo "y" | /usr/bin/dsmc incremental > /tmp/backuplog 2>&1
# Mail this to the operators
/usr/bin/mail -s "ADSM report from `hostname` "[email protected]" \
 < /tmp/backuplog

and at the 'your.filter.machine' end I filter all messages with a subject
beginning with "ADSM report from" to a script that does this:

#!/bin/bash
#
# process the adsm reports from the various machines
#
# Author: Richard Shepherd
# Date:   18/8/96
#
USAGE="Usage: `basename $0` [ adsmreport ]"
TEMP=no
#
if [ "x$1" != "x" ]
then
 if [ -r $1 ]
 then
  INPUT=$1
 else
  echo $USAGE
  echo "Sorry, $1 is not a readable file"
  exit 1
 fi
else
 INPUT=`mktempfile` && TEMP=yes
 while read LINE ; do echo "$LINE" >> $INPUT ; done
fi
#echo $INPUT
#
# enter all your favourite filtering tricks here:
# the first one I do is filter out the crappy 500 file notices
#grep -v ANS4102I $INPUT 2>&1
# capture all the headers
head -`grep -n "Server date/time" $INPUT | cut -f1 -d:` $INPUT || cat
$INPUT
echo ""
# only look for the failed items
grep -i failed $INPUT 2>&1
# something big enough to capture the summary
tail -12 $INPUT
# clean up time
if [ "$TEMP" = "yes" ]
then
 rm -f $INPUT
fi
#
# End of ADSM filter
#

where 'mktempfile' is a little script to create a uniquely named temporary
file.  This could no doubt be done a lot more efficiently with C or perl,
but all this runs during the night here and is finished well before I turn
up in the morning.

Hope this helps....

8<--------------------------------------->8
Richard Shepherd (richards AT waikato.ac DOT nz)
8<--------------------------------------->8
<Prev in Thread] Current Thread [Next in Thread>