Link to home
Start Free TrialLog in
Avatar of continum
continum

asked on

Windows Server Backup 2008 Notification

Hi,
I have a windows 2008 Server that does a full daily backup. Is there anyway to be notified of the status of the backup via email so I know if it failed or was successful?
ASKER CERTIFIED SOLUTION
Avatar of tigermatt
tigermatt
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of continum
continum

ASKER

As i thought :( Thanks anyway
you coulld setup an email task in task manager to email backup event id's to you. It could be a lot of emails as each event would have a seperate email, but at least you would know if the backup was working, and if it failed.
cdblind,

Your suggestion is wrong. Windows Server Backup does NOT log a Success/Failure message in the Event Viewer. Without checking, off the top of my head, it simply logs an event to state the backup started - NOT that it was successful or failed.

-Matt
This is the out put from Event Viewer-->Windows Logs-->Applications Services Log-->Microsoft-->Windows-->Backup-->Operational log

As you can see event ID 4 is a successful backup and it is outputted in this log. I am not an expert but this would seem to be an event showing a successful backup.

WIN Server 2008 suces as you have to dig to find this but you can set up a custom filter to show this log at the top of the tree. Sorry for the XML crap.

Log Name:      Microsoft-Windows-Backup
Source:        Microsoft-Windows-Backup
Date:          7/06/2009 11:44:28 PM
Event ID:      4
Task Category: None
Level:         Information
Keywords:      
User:          SYSTEM
Computer:      SERVER2.XXXX.local
Description:
Backup finished successfully.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Backup" Guid="{1db28f2e-8f80-4027-8c5a-a11f7f10f62d}" />
    <EventID>4</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x4000000000000000</Keywords>
    <TimeCreated SystemTime="2009-06-07T13:44:28.340Z" />
    <EventRecordID>255</EventRecordID>
    <Correlation />
    <Execution ProcessID="3212" ThreadID="5624" />
    <Channel>Microsoft-Windows-Backup</Channel>
    <Computer>SERVER2.XXXX.local</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="BackupTemplateID">{EF1C7CEF-C6C0-49BC-AF12-B00351E1A9A2}</Data>
    <Data Name="HRESULT">0</Data>
    <Data Name="BackupState">14</Data>
    <Data Name="BackupTarget">\\server2\server2full\06-07-2009</Data>
    <Data Name="NumOfVolumes">2</Data>
    <Data Name="BackupTime">2009-06-07T12:02:21.837Z</Data>
    <Data Name="HRESULT">0</Data>
    <Data Name="VolumesInfo"><VolumeInfo><VolumeInfoItem Name="C:" OriginalAccessPath="C:" State="14" HResult="0" DetailedHResult="0" PreviousState="9" DataTransferred="17984651264" NumUnreadableBytes="0" TotalSize="17984651264" Flags="2" SSBTotalNoOfFiles="0" SSBTotalSizeOnDisk="0" SSBVhdSize="0"/><VolumeInfoItem Name="D:" OriginalAccessPath="D:" State="14" HResult="0" DetailedHResult="0" PreviousState="9" DataTransferred="139635523584" NumUnreadableBytes="0" TotalSize="139635523584" Flags="2" SSBTotalNoOfFiles="0" SSBTotalSizeOnDisk="0" SSBVhdSize="0"/></VolumeInfo></Data>
    <Data Name="DetailedHRESULT">0</Data>
    <Data Name="SourceSnapStartTime">2009-06-07T12:02:21.790Z</Data>
    <Data Name="SourceSnapEndTime">2009-06-07T12:04:49.431Z</Data>
    <Data Name="PrepareBackupStartTime"><TimesList><Time Time="2009-06-07T12:04:50.695Z" /><Time Time="2009-06-07T12:15:47.998Z" /></TimesList></Data>
    <Data Name="PrepareBackupEndTime"><TimesList><Time Time="2009-06-07T12:04:51.662Z" /><Time Time="2009-06-07T12:15:48.045Z" /></TimesList></Data>
    <Data Name="BackupWriteStartTime"><TimesList><Time Time="2009-06-07T12:04:51.662Z" /><Time Time="2009-06-07T12:15:48.045Z" /></TimesList></Data>
    <Data Name="BackupWriteEndTime"><TimesList><Time Time="2009-06-07T12:15:47.998Z" /><Time Time="2009-06-07T13:44:19.307Z" /></TimesList></Data>
    <Data Name="TargetSnapStartTime">1601-01-01T00:00:00.000Z</Data>
    <Data Name="TargetSnapEndTime">1601-01-01T00:00:00.000Z</Data>
    <Data Name="DVDFormatStartTime"><TimesList></TimesList></Data>
    <Data Name="DVDFormatEndTime"><TimesList></TimesList></Data>
    <Data Name="MediaVerifyStartTime"><TimesList></TimesList></Data>
    <Data Name="MediaVerifyEndTime"><TimesList></TimesList></Data>
    <Data Name="BackupPreviousState">9</Data>
    <Data Name="ComponentStatus"><ComponentStatus></ComponentStatus></Data>
    <Data Name="SSBEnumerateStartTime">1601-01-01T00:00:00.000Z</Data>
    <Data Name="SSBEnumerateEndTime">1601-01-01T00:00:00.000Z</Data>
    <Data Name="SSBVhdCreationStartTime">1601-01-01T00:00:00.000Z</Data>
    <Data Name="SSBVhdCreationEndTime">1601-01-01T00:00:00.000Z</Data>
    <Data Name="SSBBackupStartTime">1601-01-01T00:00:00.000Z</Data>
    <Data Name="SSBBackupEndTime">1601-01-01T00:00:00.000Z</Data>
    <Data Name="SystemStateBackup">false</Data>
  </EventData>
</Event>
dam sorry for the hyperlink did not review the output closer enough
Yep - you're right. If you just concentrate on the Application/System logs, you don't get anything other than a "Backup started" message. However, digging further down into the "Backup" events you do get Success/Failure messages.

-Matt
Why is this marked as successful when further posts note the answer is wrong.  Should this not be reviewed?
I have written 2 scripts - success and failure that you can attach to the numerous events (19,49,4) related to Windows Server Backup.

It emails success or failure

works with gmail (ssl email) etc.

Would anyone like me to post them?
Please do.  Thanks.
It is a zip with instructions - unzip to the c:\scripts directory on your server (much easier this way)

read the text file HowtouseWindowsServerBackupAlerts.txt in the unzip directory

change all the emailxxx.txt extensions to .bat WINDOWSERVERSUCCESSFAILBACKUP-Ge.zip
In Server 2008R2:

Open Server Manager, expand Diagnotics | Event Viewer | Windows Logs | Microsoft | Backup | Operational

Right click the desired event, and Attach a Task......
Brilliant piece of code and how to. This is exactly what I was looking for instead of paying for programs like Backup Assist [Great program, too much money].
How are you emailing the logs?  Do you need to specify an SMTP server somewhere/somehow?

Thanks.
My appolgies, I found it in the vbs code.  Looking forward to trying it out.
Thanks.
I have expanded RLUNT's great work and added a USB eject job and email notification for those using external USB drives as their backup location.
1. Go to Nirsoft and download the USB Device eject utility. http://www.nirsoft.net/utils/usb_devices_view.html
2. Setup a scheduled task to eject the USB device at a specific time.
3. Go into the actions section and add the 2 actions as shown in the attached image.
usb-eject.zip
USBTask.JPG