Start a Conversation

Unsolved

This post is more than 5 years old

2856

October 30th, 2013 14:00

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.

so thought I would ask while I keep looking.

Community Manager

 • 

6.2K Posts

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.

498 Posts

October 31st, 2013 07:00

I only want to monitor ONE servers backup jobs, not all servers backup jobs.

Does anybody know how to use the post script to check the status of the backup job?

13 Posts

October 31st, 2013 12:00

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"

copy "%newest_log%" "c:\Temp\AV01-%datefile2%.log"

popd

c:\Temp\bmail -s smtpIP -t blah@blah.com -f blah@blah.com -a "%datefile2% AV01 Backup" -m "c:\Temp\AV01-%datefile2%.log" -c

del C:\Temp\*.log AV01-%datefile2%.log /q

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.

498 Posts

November 1st, 2013 12:00


you would think there would be an 'option' to pass the error code of the backup to the run at end script.

like   script %1

where %1 comes from the backup job, was it good = 0 , if bad any number of codes like 10007 or 10056

then you could make your script read %1 and do what you want with a test string.

Community Manager

 • 

6.2K Posts

November 4th, 2013 17:00

So, I think you may need to create some "script" to resolve the issue.

No Events found!

Top