Notification: WSB Can Do Notifications


I had a client who, much to my dismay, purchased a new server from Dell and opted not to go with Backup Exec but rather the free Yosemite Backup application that ships with the RD1000 drives. Not a huge deal until I discovered after a good deal of troubleshooting that Yosemite does not work with Server 2008 R2. Long story short, we were left with no option but to use Windows Server Backup and find a way to configure e-mail notifications.


According to Microsoft and the forums I looked at (including Expert's Exchange), the only information I found was either a big fat "not supported" or some convoluted and surely unreliable scripted solution. Several folks were on the right track with using Task Scheduler. However, everyone I spoke with lamented that WSB does not appear to log anything useful in the System or Application logs except this event:


Which tells us nothing except that the backup may be starting and is not at all useful to us. Take a look in the Applications and Services Logs > Microsoft > Windows > Backup > Operational log and we find something much more suitable:


So now that we see where our event logs appear for WSB, we can use Task Scheduler to create some email alerts. First, you'll need a few prerequisites on the server:
  1. Windows Server Backup obviously has to be installed. Unlike NTBackup in 2003, it is not included in the default installation in Server 2008.
  2. Simple Mail Transport Protocol will be needed if you don't already have an SMTP server you can relay off of (such as an ISP server). You will need to configure it to allow relaying from your WSB server with no authentication. WSB is not capable of authenticating in any way to an SMTP server.
  3. IIS 7.0 needs to be up and running to house your SMTP virtual server.
  4. IIS 6.0 Manager also needs to be installed to manage the legacy SMTP stuff.


To get started, open up Server Manager and drill down to Configuration > Task Scheduler > Task Scheduler Library > Event Viewer Tasks.




1. Select Create Task... from the task pane.


Enter a name and description for your new task. Be sure to select the option to "Run whether user is logged on or not" to ensure the task still runs after you log out. 



2. Click on the Triggers tab and click on New.



Select "On an Event" from the drop down. Hit Custom and then open a "New Event Filter..."



3. Select all of the event levels (realistically, failures should only ever use Critical, Error, or Warning, but why take the chance?). Select "By log" and choose the Microsoft-Windows-Backup/Operational log to monitor.


Enter all of the event ID's for WSB errors and warnings and then click OK. What, you don't know these? Luckily TechNet lists them for us. Here is the string you can input for the the ID's:

5,8,9,17-22,49,50,52,100,517,518,521,527,528,544,545,546,561,564,612

You could also use Keywords such as "fail" and "warning", but this just seems cleaner and more reliable to me.



4. Head over to the Actions tab and select "New...". Most of this should be self-explanatory:


I'm sure you could script some way of exporting the logs and attaching them, but this should be enough for a simple e-mail notification just to say "Hey, go look at the server cause your backup failed". If you are using another server to relay SMTP messages, enter its IP address in the SMTP Server field. You can also specify more than one recipient by either using a distribution group or separating the email addresses with a comma.



5. If you want to test your email notifications, be sure to check the "Allow task to be run on demand" option under the Settings tab.



That's it for failure notifications! I also recommend you repeat these steps for success notifications (just change the events to event ID 4 on step 3). That way if the server just drops off the network completely or has another issue preventing it from sending mail, the lack of email message will help indicate a problem. Be sure to schedule a "backup failure test" using a bad target of some sort to double-check that your failure messages trigger appropriately.


5 Response to Notification: WSB Can Do Notifications

  1. Anonymous says:

    HUGE Help, thanks!

  2. Anonymous says:

    Nice!

    But how will you ever hear from this server that this task/backup-job not run anymore? "No error mailed" <> "Job done, everything ok"

    What do you think about a trigger for the EventID 4 in combination with "last entry not older then 24 hours"?

  3. Paul Hite says:

    Yes, you are correct. That's what I'm alluding to in the final paragraph. No error message does not equal no error.

    I think your idea for a "last entry not older than 24 hours" (or whatever your backup schedule is) would be a great idea. Our managed service software can do this easily, but that is involving third party utilities.

  4. Is there any way I can get my client's GoDaddy POP account to relay the messages?

  5. Hi There. Thanks paul for this great tutorial. I was wondering if anyone had documented how to add the 'not older than' idea? I can't see how to set this up. Thanks, Mark.

Post a Comment