Solved

Windows Backup and Task Scheduler

Posted on 2010-08-18
5
2,199 Views
Last Modified: 2012-05-10
Hi,

I'm currently backuping up about 10 users PCs after installing new drives. By doing so anything on the new drives would need to be backed up onto the C drive. This works fine as i find windows backup to be quite a good local backup utility, but my dilemma stands at producing an email to be sent to our backup mailbox upon failure.

I have attempted to use Task Scheduler to send an email although i keep recieving a Run Failure.

So far i have set up Task Scheduler to send an email When a specific event is logged"  followed by "Log - Application", "Source - Backup" and "Event ID - 521".

I then fill the space, From, To, Subject, Text and SMTP server.

This seems simple enough although when i tested this through other event IDs, to see if it would work recieve the Run Failure - Task Scheduler failed to complete task "\Test" , instance "{98990505-bff7-4192-96cd-e1baf770ba81}" , action "Test Email" . Additional Data: Error Value: 2147746323.

I know that i am inputting the correct details and port 25 is open on the SMTP server.

I'm currently stumped at how i can achieve to send an email after windows backup failure.


Note: Event ID 521 for Backup produces the error Backup started at '%1' failed as Volume Shadow copy operation failed for backup volumes with following error code '%2'. Please rerun backup once issue is resolved.

Cheers.
0
Comment
Question by:pps-
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:sosinc3
ID: 33471034
Is SMTP relaying allowed on your SMTP server and/or does it require user authentication in order to relay?
0
 

Author Comment

by:pps-
ID: 33471092
we allow SMTP relay from certain hosts and we do not require user authentication in order to relay
0
 
LVL 30

Accepted Solution

by:
Brad Howe earned 500 total points
ID: 33471094
Hi,

I created the same task as well. Save this as task.xml, open Task Scheduler, Right click Import and browse to the task.xml.
Change eventID to 4 for successful backups and 5 for failed backups. As well, change the hightlighted settings to something that makes sense.

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2010-07-27T09:02:30.2065391</Date>
    <Author>SERVERNAME\User.Account</Author>
    <Description>Send Notification email on Failed Server Backup</Description>
  </RegistrationInfo>
  <Triggers>
    <EventTrigger>
      <Enabled>true</Enabled>
      <Subscription><QueryList><Query Id="0" Path="Microsoft-Windows-Backup"><Select Path="Microsoft-Windows-Backup">*[System[Provider[@Name='Microsoft-Windows-Backup'] and EventID=5]]</Select></Query></QueryList></Subscription>
    </EventTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>SERVERNAME\ServiceAccount</UserId>
      <LogonType>S4U</LogonType>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <SendEmail>
      <Server>smtp.mailserver.com</Server>
      <Subject>FAILED - Backup of SERVERNAME</Subject>
      <To>youraccount@domain.com</To>
      <From>Monitoring@server.com</From>
      <Body>Please jump on SERVERNAME and review event logs and Windows server Backup logs for more details.</Body>
      <HeaderFields />
    </SendEmail>
  </Actions>
</Task>  
Cheers,
Hades666
0
 
LVL 30

Expert Comment

by:Brad Howe
ID: 33471104
You can also verify SMTP is correct.

Open CMD
Type "telnet mail.smtp.com 25"

If it responds you can send an email out by issuing the commands...

MAIL FROM:servername@domain.com
RCPT TO:you@domain.com
DATA
This is a test.
.
QUIT

If you receive this, SMTP is working properly. If you get any error codes, please let us know.

cheers,
Hades666

0
 

Author Closing Comment

by:pps-
ID: 33471118
Brilliant Work to the Experts!
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now