cancel
Showing results for 
Search instead for 
Did you mean: 

Client Email Notification

Stryker901
Level 2
Hello all,

I'm new to the forums and wanted to see if somebody here might be able to give me a hand.  I'm interested in the ability to notify our clients about successful or failed backups with email.  I'd also like to be able to email them a listing of all files that were backed up (bplist results).  Does anybody have an idea as to the best way this can be accomplished?  I thought about using the bpend_notify script but am having trouble finding documentation for what I'm looking for. 

I'd also like to know how to narrow my bplist results to the most current backup rather than the last 6 months of backups.  Can this be done or would something like this require manual manipulation of the command? 

Any and all help is appreciated.  Thanks for the time. 
4 REPLIES 4

sdo
Moderator
Moderator
Partner    VIP    Certified
The problem with bpend and bpstart notify is that they aren't given the jobid.  They do, of course, have client and policy and schedule names, and they do also have access to the stream number and number of sreams.
 
The trouble you will have is identifying the time range of a job and which job the running job actually is.  Also, if you have multi-streaming, how do you tell if other streams have finished before sending an email, or will you let each job each send an email, each with varying sized mostly incomplete listings (as other jobs may not have finished yet) - I say this because you'll probably only be able to, for eample, list the files from backups in the last 'n' hours.  It's all a bit messy to me.
 
Why not run a job on the host in the morning that sends a list?
Or, do you really want all clients all to send a listing?  Do you have thousands of clients, and want your script to be part of a standard install/build?
This will mean a copy of the script on every client.  If you modify the script you'll have to update all the copies on all of the clients.
Also, remember that any accidental output within/from bpstart/bpend notify is treated as input to the backup stream - so you have to be very very careful that your scripts run quietly, i.e. no accidental output to either stdout or stderr - or the backup can/will fail.
 
Personally, I think I'd just run a job in the morning that emails the various selected clients.  You can run when you want, for the clients that you want.  One copy of code.  You have control.
 
 
Here's some notes re bplist:
 
Example bplist:
Example1:
bplist -B -S master1 -C client1 -t 0 -unix_files -l -b -R 999 -s 10/10/2006 17:00:00:00 -e 10/11/2006 12:00:00 -F
Example2:
bplist -B -S MYMASTER -C MYCLIENT -k MY-POLICY-NAME -t 0 -unix_files -l -b -R 999 -s 08/04/2006 09:00:00:00 -e 08/30/2006 10:00:00 -F "/folder/subfolder"

Notes:
The bplist command accepts many switches/qualifiers and only one optional parameter.
bplist
 -B   List/search backups.
 -S master  Specify Master server.
 -C client
 -k policy
 -t 0   Policy type, 0 for standard (ie. Unix and VMS), 13 for Windows (PC, NTFS).
 -unix_files  Report file names in unix format.
 -l   Report format.
 -b   Report date/time of start or backup job (not the actual backup time), also -c (created) or -u (modified).
 -R n   Recurse down 'n' folders.
 -s mm/dd/yyyy hh:mm:ss Since, all date/time fields must be specified in full.
 -e mm/dd/yyyy hh:mm:ss Ending/before, all date/time fields must be specified in full.
 -F   Show when folder names are hard/symbolic links by also including an "@" character at the end of the file name.
 "/path/name"  The folder path or name to search for.  This is the one and only parameter.
 
Other regularly used switches are:
 -I   Case insensitive search
 -PI   Path independent search, i.e. find file name anywhere in the path.
 -c   List the file created date/time, not the -b backup time or the -u modified time.
 -u   List the file modified date/time, i.e.not the -b date/time of the start of the backup job, nor the -u modified date/time of he file.
 -r   List the disk images, not the files contained in the images.
 -nt_files  List files in Windows based NTFS style/layout/
 -keyword "text"  List backup/file matching the specified keyword.
 -Listseconds  Changes the date/time reportd (i.e. one of -b -c or -u) to show seconds, date is lost/not shown when this is selected.
HTH,
Dave.

Stumpr2
Level 6
Have you installed NOM?
 
 

Stryker901
Level 2
Yes, we do have NOM installed.  We are still getting used to it as our upgrade to 6.0 was very recent.  Are there options in there I should look into for this type of notification?

We are currently using a crontab entry for notification.  This works to an extent but can require some micromanagement at times due to the changing backup date.  We were looking for ways away from this since we already have large crontab files due to archiving. 

Stumpr2
Level 6
yes, definitely.
 
It can give real time access to information to any of your customers.