Veritas-bu

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

2009-11-11 13:12:01
Subject: Re: [Veritas-bu] Notify batch file - End of Job
From: <Rusty.Major AT sungard DOT com>
To: Scott Jacobson <SJACOBSO AT novell DOT com>
Date: Wed, 11 Nov 2009 12:11:39 -0600

You could install and use cygwin to run Nix scripts on windows.

Rusty Major, MCSE, BCFP, VCS ▪ Sr. Storage Engineer ▪ SunGard Availability Services ▪ 757 N. Eldridge Suite 200, Houston TX 77079 ▪ 281-584-4693
Keeping People and Information Connected® ▪ http://availability.sungard.com/
P Think before you print
CONFIDENTIALITY:  This e-mail (including any attachments) may contain confidential, proprietary and privileged information, and unauthorized disclosure or use is prohibited.  If you received this e-mail in error, please notify the sender and delete this e-mail from your system.


Scott Jacobson <SJACOBSO AT novell DOT com>
Sent by: <veritas-bu-bounces AT mailman.eng.auburn DOT edu>

11/11/2009 10:52 AM

To
<judy_hinchcliffe AT administaff DOT com>, <VERITAS-BU AT mailman.eng.auburn DOT edu>
cc
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
 
 _______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu

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