Veritas-bu

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

2005-01-26 13:02:46
Subject: [Veritas-bu] Backup_exit_notify script / snmptraps...
From: michael AT mlbarrow DOT com (Michael L. Barrow)
Date: Wed, 26 Jan 2005 10:02:46 -0800 (PST)
<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


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