Veritas-bu

Re: [Veritas-bu] Notify batch file - End of Job

2009-11-11 12:11:47
Subject: Re: [Veritas-bu] Notify batch file - End of Job
From: "WEAVER, Simon \(external\)" <simon.weaver AT astrium.eads DOT net>
To: "Scott Jacobson" <SJACOBSO AT novell DOT com>, <judy_hinchcliffe AT administaff DOT com>, <VERITAS-BU AT mailman.eng.auburn DOT edu>
Date: Wed, 11 Nov 2009 17:11:35 -0000
Pretty sure I am just using NBMAIL.CMD and backup_exit_notify.cmd commands under the BIN directory.
 
It simply send an email from an SMTP Server to an email address and reports the status on ALL jobs (ie: 0, 1, higher, ect)
 
Simon


From: veritas-bu-bounces AT mailman.eng.auburn DOT edu [mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of Scott Jacobson
Sent: Wednesday, November 11, 2009 4:53 PM
To: judy_hinchcliffe AT administaff DOT com; VERITAS-BU AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] Notify batch file - End of Job

Thanks Judy,
 
Not sure how much of this I would be able to convert to a Windows batch file.
 
Anyone else with a similar solution?

>>> <judy_hinchcliffe AT administaff DOT com> 11/11/2009 8:57 AM >>>

You can try parent_end_notify. - only runs on the master (easier to maintain)

 

# This script:

#       receives 5 parameters:

#         CLIENT           - the client hostname

#         POLICY           - the policy label

#         SCHEDULE         - the schedule label

#         SCHEDULE_TYPE    - the type of schedule:  FULL INCR UBAK UARC

#         STATUS           - the backup status for this job

#         STREAM           - the backup stream number for this job always -1

#       must be executable by the root user

#       should exit with 0 upon successful completion

 

You just have to put in If statements for each think you want to monitor

 

My example

Runs when the Parent of the Hot Catalog backup finishes

 

if [ $2 = "Hot_Catalog_Backup" ]

 then

 OUTF=/usr/openv/netbackup/bin/PARENT_END_CALLED.Hot_Catalog_Backup

  if [ -s $OUTF ]

   then

        /bin/rm -rf $OUTF

  fi

 

  if [ ! -f $OUTF ]

   then

        touch $OUTF

  fi

 

 echo ${dateStr} "-----------------------------" >> $OUTF

 echo ${dateStr} "       CLIENT:  $1" >> $OUTF

 echo ${dateStr} "       POLICY:  $2" >> $OUTF

 echo ${dateStr} "     SCHEDULE:  $3" >> $OUTF

 echo ${dateStr} "SCHEDULE TYPE:  $4" >> $OUTF

 echo ${dateStr} "       STATUS:  $5" >> $OUTF

 echo ${dateStr} "       STREAM:  $6" >> $OUTF

 echo ${dateStr} "-----------------------------" >> $OUTF

 /usr/sbin/rdist -f /usr/sysadmin/scripts/Data/Rdist_Dist_Netbackup_PROD >> $OUTF

 cat $OUTF | mail -s "Netbackup parent end notify for Catalog" someonewhocares AT mycompany DOT com

fi

 

 

From: veritas-bu-bounces AT mailman.eng.auburn DOT edu [mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of Scott Jacobson
Sent: Wednesday, November 11, 2009 9:25 AM
To: nbu
Subject: [Veritas-bu] Notify batch file - End of Job

 

Env: 6.5 Master (Windows)

 

I've looked again in goodies and admincmd for a script or batch file that can monitor by policy (or by server name) a backup's completion and then send an e-mail to notify a non-administrative user.

 

Anyone have something they've created and are willing to share that would do this?

 

Thanks,

Scott

 

 

This email (including any attachments) may contain confidential
and/or privileged information or information otherwise protected
from disclosure. If you are not the intended recipient, please
notify the sender immediately, do not copy this message or any
attachments and do not use it for any purpose or disclose its
content to any person, but delete this message and any attachments
from your system. Astrium disclaims any and all liability if this
email transmission was virus corrupted, altered or falsified.
-o-
Astrium Limited, Registered in England and Wales No. 2449259
Registered Office:
Gunnels Wood Road, Stevenage, Hertfordshire, SG1 2AS, England
_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu