Veritas-bu

[Veritas-bu] backup_exit_notify script question

2006-05-19 14:07:47
Subject: [Veritas-bu] backup_exit_notify script question
From: Mark.Donaldson AT cexp DOT com (Mark.Donaldson AT cexp DOT com)
Date: Fri, 19 May 2006 12:07:47 -0600
(Resending for size)

At least for unix systems, there's two environmental variables that are
set.
 
STREAM_NUMBER, the number of this particular stream of the overall image
set
STREAM_COUNT, the total number of streams in this particular set.
 
so, if each stream that ends writes a line to a file, when the last
stream in the set ends, the number of lines is equal to the number of
jobs, STREAM_COUNT.  This is the last stream of the set and its this
bpend job that gets the honor of cleaning up the backup (or sending
warnings/mail/etc).
 
 
...wait...
 
...I've screwed up...
 
I should just delete this all above but I'll leave it and explain that
this is for: bpend_notify.<policyname>, the client-side end-of-job, not
backup_exit_notify, which is master-server, run after every job.
 
OK - so, given this...
 
I'd suggest writing a bpend_notify job on the client.  Name it
bpend_notify.<policyname> to limit it to run for only this policy and
write a hack for it.
 
v6.0 is supposed to have a sense of parent job start/end to make this
all easier.  The bpend scripts, though, have the STREAM_COUNT &
STREAM_NUMBER variables.
 
Otherwise, I think you're sending an email for each job that ends using
backup_exit_notify.  It just doesn't have the smarts to filter finer.
 
-M

________________________________

From: Pero, Greg [mailto:GPero AT downeysavings DOT com] 
Sent: Friday, May 19, 2006 10:36 AM
To: Donaldson, Mark - Broomfield, CO; veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] backup_exit_notify script question



Mark - 

 

Thanks for the response.  Not sure I follow with the STREAM_COUNT
variable .... Are you pulling this from outside backup_exit_notify?   My
understanding is the STREAM variable that gets passed to
Backup_Exit_Notify is the same for all jobs in that stream - is this not
correct?   

 

Greg

 

Greg Pero

NetSys Systems Engineer Senior

Downey Savings

(949) 509-4488 - office

7142003420 AT vtext DOT com - pager/text message

(714) 200-3420 - cell

gpero AT downeysavings DOT com

________________________________

From: Mark.Donaldson AT cexp DOT com [mailto:Mark.Donaldson AT cexp DOT com] 
Sent: Thursday, May 18, 2006 12:07 PM
To: Pero, Greg; veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] backup_exit_notify script question

 

You can't do this with stream number because there's no guarantee what
in order the streams will complete.  Most of us have nasty hacks for
this.

 

My version has every stream that ends write a line to the same file.
Then it checks the size of the file, if the number of lines matches the
STREAM_COUNT variable, then I assume its the last stream to exit and it
runs the cleanup routine.

 

The line it writes to the file, by the way, is the return code for that
stream.  The cleanup routine checks for all zeros & sends warnings if
any of the streams were non-zero exits.

 

-M

 

________________________________

From: veritas-bu-admin AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu] On Behalf Of Pero, Greg
Sent: Thursday, May 18, 2006 11:19 AM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] backup_exit_notify script question

Running Netbackup 5.1 mp4 on W3K - have backup_exit_notify.cmd
configured to send email alerts (based on the status code) via blat to
the NB Sys Admin.  I need to figure out a way to send a single email to
a user after a specific scheduled policy has completed (the job runs
from the master server - not the client).  Filtering out the policy and
schedule is straight-forward - problem I'm having is the policy spawns
multiple jobs and emails get sent when each job completes.  I would
assume someone has already figured out how to do this using the stream
number - any help would be greatly appreciated!

 

Thanks,

 

Greg

 

 

 

Greg Pero

NetSys Systems Engineer Senior

Downey Savings

(949) 509-4488 - office

7142003420 AT vtext DOT com - pager/text message

(714) 200-3420 - cell

gpero AT downeysavings DOT com

 

 

This message and any attachments are for the intended recipient(s) only
and may contain privileged, confidential and/or proprietary information
about Downey Savings or its customers, which Downey Savings does not
intend to disclose to the public.  If you received this message by
mistake, please notify the sender by reply e-mail and delete the message
and attachments.



This message and any attachments are for the intended recipient(s) only
and may contain privileged, confidential and/or proprietary information
about Downey Savings or its customers, which Downey Savings does not
intend to disclose to the public.  If you received this message by
mistake, please notify the sender by reply e-mail and delete the message
and attachments.