Veritas-bu

[Veritas-bu] Backup_exit_notify script / snmptraps...

2005-01-26 16:57:39
Subject: [Veritas-bu] Backup_exit_notify script / snmptraps...
From: Chester.Martin AT acxiom DOT com (Martin Chester - cmarti)
Date: Wed, 26 Jan 2005 15:57:39 -0600
I've altered the backup_exit_notify to run a kixtart script file if the
return code wasn't 0.  Inside of this script file it runs the bperror on the
client that was backed up and emails the log to our team.  I do this so
we'll know as soon as a backup fails on a client.  No email is sent if the
backup is successful.

Once a night I run an automated task that runs a bperror of the previous
nights' backup of each client we backup with netbackup.  It reads a file to
get a list of the client machines to run the bperror against.  I actually
run two bperror commands against each client.  One to get a one line output
of the job status and one to get the entire log so I end up with two output
files.  The smaller file which contains the one line status of each job is
altered by the script so there will only be one header line and only the one
line output of each job ran under that.  I email that attached file to my
team.  Also inside this email is a link to the file with the entire backup
status of each client in it.

-----Original Message-----
From: veritas-bu-admin AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu] On Behalf Of Michael L.
Barrow
Sent: Wednesday, January 26, 2005 12:03 PM
To: Jeff McCombs
Cc: veritas-bu AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] Backup_exit_notify script / snmptraps...


<quote who="Jeff McCombs">
> Gang,
>
>     Is there an equiv to the backup_exit_notify script that provides 
> more information than just 'client' 'schedule', 'schedule_type', etc?
>

This is pretty funny because I was about to send my own query to the list
about backup_exit_notify. I'm annoyed because according to the printed docs,
it executes when the backup is finished. Upon checking the Technotes (and
the sample installed with NBU), I see that it also tells you the stream
number.

I just want to know when the entire backup is completed, but
backup_exit_notify doesn't seem to have any idea about how many streams were
included in this job.

Digging around trying to think of an answer to both of our problems, I
thought of using the execution of backup_exit_notify as a signal to use
bperror to find out more information.

My thought process is:

1. backup_exit_notify gets called

2. Use bperror to try to track down information on the job that just
completed:
   bperror -client <client> -d <now - 5 minutes> -e <now>

3. Parse through that output looking for the 'bpsched' line that matches the
client, schedule, policy, and exit status that you received through
backup_exit_notify. That should give you the primary job ID and secondary
job ID if it was a job with multiple streams.

4. You can then call bperror again with the -jobid switch and look for the
matching 'handling path' lines that come from bpsched.

Can anyone think of a classier/neater way of doing this?

--
Michael Barrow
michael AT mlbarrow DOT com

_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu


**********************************************************************
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.


<Prev in Thread] Current Thread [Next in Thread>