how to send email when backup finishes good or bad
what is the best way to get an email from a backup job.
I have one server that has its own policy... I need and emailwhen that backup finishes that tells me the status of that backup was it good, has it failed, does it have exceptions.
I was hoping avamar had something built in or I can use DPA but am not finding this quickly.
I'm trying to construct a solution to this for myself, since it's a feature utterly lacking from the product. What I think may be workable is to use the Dataset / Advanced Options / Post-Script option to execute a script on the server to email the latest client log.
;REM - Generate Notification post backup
@echo off
for /F "tokens=2,3,4 delims=/ " %%i in ('date /t') do set datefile2=%%i-%%j-%%k
pushd "c:\Program Files\avs\var\clientlogs"
for /f "delims=" %%x in ('dir "*.log" /B /O:D') do set "NEWEST_LOG=%%x"
The above is the ugly first pass that you might be able to work with for a solution. The script needs to be located in "C:\Program Files\avs\etc\scripts\" on the avamar client you'd wish to receive the email from. You'll also need bmail or some other command-line mailer/method.
A downside is that this doesn't get you the full job log, since the job is still technically running, and the last four lines that summarize the status of the job are excluded. However, you do get the completion of backup stats...
If someone has a better idea, I'd love to hear about it! I do need to refine the script to only take the last few lines of the client log to get the completion status only, and not all of the other information.
Leo Li
4 Apprentice
•
9030 Posts
2245
0
Posted October 30th, 2013 23:00
Hey,
There is an "Email Home" function on Avamar. I think you can try to use the function.
1. Login to your Avamar GUI.
2. Click Tools -> Manage Profiles
3. You will see many profiles.
4. Find "High Priority Events" profile, then copy it to a new profile(Any name).
5. The new copied profile can be used for sending email notification.
6. Edit the new profile and click "Event Codes", then select the event codes you want to monitor.
Notice: If you monitor too many events, you may received notification email frequently.
7. Click "Email notification", enter a email address you want to receive notification email to "Enter Recipient".
For more detailed about "Email Home", you can refer to following documents.
"Enabling the Email Home feature" section of Avamar 7.0 Operational Best Practices on page 88.
"Modifying “Email Home” configuration" section of Avamar 7.0 Administration Guide on page 200.
Hope this helpful.