cancel
Showing results for 
Search instead for 
Did you mean: 

Email Notifications for specific Policy

Tim_O_Brien_2
Level 4
I am trying to setup email notifcations for a specific policy-client.
 
For example: I want to know if a policy <SQLBackup> with one client <Pancake> completes successfully each night, what scripts do I need to edit to do this? I tried calling Tech Support but they said you can't set-up a email notification for a specific Policy and specific client but I don't believe this is the case.  I currently have email notifications (installed Blat) for ALL clients if they fail and now want to set-up email notifications for again specific policies and clients. This is a windows machine btw Netbackup 6.0 MP4. Thanks for your help.
9 REPLIES 9

Stumpr2
Level 6
This technote shows policy and even schedule dependencies
 
Notification scripts and their usage
 
 

Stumpr2
Level 6
 
DOCUMENTATION: How to configure email notification and the different methods to email backup exit statuses from a UNIX master in NetBackup
 
 
Of course you will need to change the forward / to a \ whack for windows. The theory is still the same.

Message Edited by Bob Stump on 04-09-200703:01 PM

Stumpr2
Level 6
There is a limitation. You mentioned SQL...unhuh. The notify scripts don't work with SQL
 
The bpstart_notify and bpend_notify scripts do not get called during a SQL database backup.
 
This issue is related to a limitation of the DBBACKUP.EXE process. During SQL backups, DBBACKUP.EXE is the process responsible for the backups. This process does not have the capability of calling the bpstart_notify and bpend_notify scripts; therefore, the scripts will fail to execute.
 
 
 

Tim_O_Brien_2
Level 4
I currently keep a SQL_Restore Policy on my Master Server as a restore template. When I get a new SQL restore request I simply change the name of the client and copy the new restore script to the client and when it completes I deactive the policy. Does Netbackup "see" the SQL_Restore policy as a backup? I noticed that the parent job looks just like a backup and then calls the child restore job. When the job completes the SQL_Restore parent will complete with a Status 0 if it completed successfully. I do restores sometimes late at night and hope I can just send an email notications for restores which take a long time instead of having to stay up at night and email production support when it completes. I reviewed the link you provided and am confused if this "restore" policy will behave the same as a backup policy? It seems like there is no difference so wondering if those backup notifications can be used in this case.

Rakesh_Khandelw
Level 6
For SQL restore, if it is initated from NBU server, it will always show as backup job, because all it does runs the script. It's the script which perform backup/restore function.

You should be able to send email through the script/bch file you are executing for restore.

Tim_O_Brien_2
Level 4
I never tought about that but seems like an excellent suggestion. Could you provide some information of how I can add this into my restore script? is it simply a 1 line command at the bottom of the restore script?
 
 
 
 

Dennis_Strom
Level 6
If the script is being run on a unix box you can use mail or mailx
example
cat file | mailx -s "this is a netbackup email" user@domain.com

Rakesh_Khandelw
Level 6
If you are creating log file which captures status for the jSQL activity, you can cat it and use mail/mailx program to send the output to desired recipients. or you an add the command at the end of your script file, you may have to put some kind of condition in between so that it wait for the process to finish before sending the email.

Tim_O_Brien_2
Level 4
Does this relate to Windows Clients? or only Unix