Category: Backup

Notification by Email for Windows 2008 Backup
article #359, updated 3190 days ago

It is very possible. Here is a good way.

Windows 2008 Backup Reporting by Email

I    Prepare the script.

The purpose of the script is to actually send the email. We don’t use any built-in email capability, because to do so would make configuration much more complicated. The full text of the script is at the end of this document (as section III). You will need to modify the values for EmailSubject and EmailBody to match the site at which the server is located, and put this modified copy in a good safe location on the server.

The script is pre-configured for gmail. For other ISPs you may need to modify the TCP/IP email port number and/or turn SSL off.

This example will use the location “C:\0DCST\bin”, and the script file name “ReportBackupFailureByEmail.vbs”.

II    Insert the script into the Task Scheduler.

1. Open up Task Scheduler, and view the Task Scheduler Library.

2. Select Create Task… under Actions. This gets you here:

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.

3. Click on the Triggers tab and click on New. Select “On an Event” from the drop down. Choose “Custom” under Settings.

4. Click on “New Event Filter…”. Then, choose as follows:

Select all of the event levels except “Information” and Verbose”. Then select “By log”. In the Event Logs dropdown, open Applications and Services Logs, then Microsoft, then Windows, then Backup, and choose Operational.

Once your end result looks like this:

press OK.

5. Head over to the Actions tab and select “New…”. For this example, the following is correct:

Press OK and OK, put in your authentication, and you’re done!

III    The Script:

''''''''''''''''''''''''''''''''''
' Report Backup Failure by Email '
''''''''''''''''''''''''''''''''''

' Script version 1.0
' Needs to be run by Task Manager, triggered by appropriate events

' Modify lines below only to fit site, server, and email configuration

ServerName = "SERVERNAME"
SiteName = "SITENAME"

Const EmailFrom = "emailfrom@gmail.com"
Const EmailFromName = "From Name"
Const EmailTo = "emailto@domain.xyz"
Const SMTPServer = "smtp.gmail.com"
Const SMTPLogon = "emailfrom@gmail.com"
Const SMTPPassword = "gmailpassword"

Const SMTPSSL = True
Const SMTPPort = 465

' Do not modify anything further below

EmailSubject = ServerName & ":  Windows 2008 Backup has failed"

EmailBody = "A failure of Windows 2008 Backup has been recorded " & _
		"at site " & SiteName & " on server " & ServerName & ", " & _
		"on " & Date & ", " & Time & " ."

Const cdoSendUsingPickup = 1 	'Send message using local SMTP service pickup directory.
Const cdoSendUsingPort = 2 	'Send the message using SMTP over TCP/IP networking.

Const cdoAnonymous = 0 	' No authentication
Const cdoBasic = 1 	' BASIC clear text authentication
Const cdoNTLM = 2 	' NTLM, Microsoft proprietary authentication

' First, create the message

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = EmailSubject
objMessage.From = """" & EmailFromName & """ <" & EmailFrom & ">"
objMessage.To = EmailTo
objMessage.TextBody = EmailBody

' Second, configure the server

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = SMTPLogon

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = SMTPPassword

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = SMTPPort

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = SMTPSSL

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

objMessage.Configuration.Fields.Update

' Now send the message!

objMessage.Send

Categories:      

==============

Notifications for Windows Server Backup (2008)
article #340, updated 3267 days ago

After a whole lot of looking:

http://www.paulhite.com/2010/02/notification-wsb-can-do-notifications.html

The above requires Microsoft SMTP to be installed, which means no SMTP auth on the outbound — but a solution to that is at hand. Use this Gmail-sending VBscript, as the “action” to the error event list Paul Hite gives us:

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

and we’re in! I will try to get permission from Paul to rewrite all of this step-by-step in detail. For now, the idea is, we set up a “scheduled” task which triggers on the above event list (and not by a timed schedule). We go to Server Manager, Configuration, Task Scheduler, Task Scheduler Library, Microsoft, Windows, and Backup, and create a new task, beginning the task on an Event, settings Custom not Basic, with a New Event Filter; set it “By log”, and drill down “Applications and Services Logs”, “Microsoft”, “Windows”, “Backup”, and choose “Operational”. Then, set its “Action” is the above-mentioned VBscript.

And if we want a separate notification on successes, we can make a copy of the VBscript with a “success” message, and instead of the above error event list, we just use event 4.

Voila!

Categories:      

==============

Windows Backup on Server 2008
article #319, updated 3314 days ago

Windows Backup on Server 2008, is very different than previous backup tools provided by Microsoft. It is block-level, meaning that it handles only whole volumes (drives) at once. But it works very well, it has much lower impact on resources. It uses VSS as its basis.

Data difficult to identify, but useful for setting up monitoring, follow.

Service name: Block Level Backup Engine Service
Executable (on 32-bit, default): “C:\Windows\system32\wbengine.exe”
Command-line utility (runs from elevated CMD): wbadmin

Categories:      

==============

Free file synchronizer with VSS
article #212, updated 3349 days ago

Here is a very good file synchronizer, free of charge to all, which does Volume Shadow Copy for locked files:

http://freefilesync.sourceforge.net/index.php

Categories:      

==============

VSS Resources Errors on Windows Server 2003
article #310, updated 3349 days ago

This page has lots of good steps to take:

http://www.storagecraft.com/kb/questions.php?questionid=244

Categories:      

==============

Back up Exchange 2003 using Windows Backup (NTBACKUP)
article #277, updated 3415 days ago

An excellent article is here:

http://www.petri.co.il/backup_exchange_2000_2003_with_ntbackup.htm

Categories:      

==============

A simple backup system with disk2vhd
article #265, updated 3455 days ago

This works, to back up C drive to \\DEST_SERVER\E$\SHARE, if disk2vhd.exe is within the path:

REM
REM A simple backup system using disk2vhd
REM
REM version 1.3, by J.E.B., 2011-02-22
REM
REM requires 'disk2vhd.exe' to be in the path
REM

setLocal EnableDelayedExpansion

REM "DRIVES" can be one drive identifier with colon, multiple separated by spaces,
REM or asterisk for all.  
REM "DEST" can be a drive letter or a UNC.

SET DRIVES="*"
SET DEST="\\SERVER\SHARE"

REM Keep most recent 4 VHD files in DEST, delete the rest

for /f "skip=4 tokens=* delims= " %%a in ('dir/b/o-d %DEST%\*.VHD') do (
del %DEST%\%%a
)

REM Backup to VHD

C:
cd \
DISK2VHD %DRIVES% %DEST%\D2VBK--%date:~-10,2%%date:~-7,2%%date:~-4,4%_TS.VHD

Categories:      

==============

Create a VHD (virtual hard drive) from a running server
article #242, updated 3496 days ago

The following:

http://technet.microsoft.com/en-us/sysinternals/ee656415

creates one or more Microsoft VHDs, suitable for use in Hyper-V and Virtual PC, from the drive(s) and/or RAID volume(s) of a running server or workstation.  Server 2003 / XP and up.

Categories:      

==============

StorageCraft ImageManager does not find any backup images
article #239, updated 3502 days ago

If you run into this, stop the ImageManager service, and delete the file “ImageManager.mdb” from the ImageManager program’s folder.  (Don’t touch ImageManager.clean.mdb!)  Then restart the service.  ImageManager.mdb will be rebuilt, and all will be well.

Categories:      

==============

Download StorageCraft
article #183, updated 3657 days ago

To download StorageCraft:

http://www.storagecraft.com/software_update.php

Categories: