Tuesday 17 March 2015

How to E-Mail backup notifications for Windows Backup

I love SBS - but we occasionally get a server that doesn't use it but we will still want to use Windows Backup. I hate not having reports, therefore we came up with the following alternative for emailing backup success events:

It utilities a third party mail sending tool which you can specify remote email servers and authentication parameters 

http://caspian.dotconf.net/menu/Software/SendEmail/
http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v156.zip

1: Setup your backup job and successfully run it at least once
2: Go to your event viewer and then "application and services logs"
3: Enter the "Microsoft" folder and then "Windows", "Backup" and select "Operational"
4: Find the successful backup log (It should have an event ID of 4) and then right click on it and select "Attach a task to this event"
5: Name the event (I leave it as the default name) and click "Next"
6: Because we're tying the task to an event the information will already by filled in for the second section, so click "next" again
7: On the action page, select "Start a program" and click "Next"
8: Extract the Send Email application at the top of this post to somewhere on the server and then browse to it and select it as the program to launch.
9: In the "Add Arguments" box enter the following details:
-f fromaddress@somewhere.co.uk -t toaddress@somewhereelse.co.uk -u FromName -m EmailSubject -s your.mailserver.co.uk -xu mailserveruser -xp mailserverpassword

Be sure to change the above for real values, a breakdown of the options are:

-f from address
-t to address
-u from name
-m email subject
-s mailserver
-xu mailserver username
-xp mailserver password

10: Click "Next" and then "Finish"

Your event task is now created - if you go to the task scheduler and select "Event Viewer Tasks" you should able to see it in there and even run it to check it works.

Works a treat - kudos to SendEmail team for lightweight app

Thursday 12 March 2015

Restoring a Windows Backup to a 2008 or Vista Virtual Machine when you can't use SCSI drivers. USB drive wouldn't offline

A local company had an unfortunate incident with their buildings power supply which managed to blow up their server. We had a good Windows Backup of it (2008 SBS) however the USB drive seemed a little iffy.

To get them back online ASAP we decided to restore the backup onto the replacement server as a virtual machine - they already had a spare 2008 R2 licence so we used this as the host OS.

When it came to trying to restore the backup, the external USB drive wouldn't offline - which meant that we couldn't mount it as a virtual drive in the guest. To get around this, we ended up cloning the USB drive to a VHD and then mounting this instead.

All good, except I then discovered that 2008 cannot mount the SCSI drive from the installation area. A lot of digging later I was still with a solution and running out of time.

Eventually, I hit upon the idea of doing it over the network instead (why it didn't come to me sooner I don't know!). So I removed the Virtual Network Adapted, added a Legacy Network Adapter so the guest installer could use it and then shared the VHD on the host which was then access by the guest over the network and restored.

9 hours later (!) and just in time for the next day of trading of the company the restore completed and the server was good to go after a few driver tweaks here and there.

Next time this happens I'll remember to ignore the SCSI option for anything older than Windows 7/2008 R2 and just use a legacy network driver and restore over the network immediately.


Tuesday 3 March 2015

Sage 2015 Accounts backup errors - unable to connect to the sage data service

With a new Sage update comes some more sage bugs - and this one threw me totally. After fixing problems with the sage data service on a server a client was still receiving the following error when trying to backup their data:

"unable to connect to the sage data service"

This didn't make any sense, as we were logged into sage which meant the service was working.

Eventually, we tracked this down to a bug in the new sage update which meant that if you connect to your sage data using a mapped drive (s: for example as most of our clients do) the local sage wasn't able to talk to the data service on the server.

This solution? Simply edit your company file to use a UNC instead of a mapped drive:

So what was: S:

Became: //servername/sage

Problem solved!

Cannot Configure Backup Schedule - SBS 2008 2011 - the filename, directory name or volume label syntax is incorrect. Adding a new backup drive to an existing backup set

Naturally, we have a lot of clients who using Windows Backup with SBS - its a great little utility that comes with reporting. In some situations we have 8 tapes running in a grandfather, father, son rotation which span many months.

Annoyingly, if you try and add a new backup drive to the job and don't have all the original disks to hand you will often get an error message such as:

Cannot Configure Backup Schedule
or
the file name, directory name or volume label syntax is incorrect. Adding a new backup drive to an existing backup set

You can get around this by plugging in all the backup drives and adding the new one - but does anyone have THAT many USB ports on a server? and what if some of the drives are offsite/failed/etc?

The alternative is to use the command line backup utility called wbadmin (windows backup admin). Follow the below steps:

1: Open up a command line with administrative privileges
2: wbadmin /? for a list of options
3: Assuming you have a job already running and you want to add another disk, firstly we have to identify the disk in question. So plug it in and then when the system is ready, type wbadmin get disks
4: A list of all the disks will appear in the system - look for the new backup drive and then right click and select "mark"
5: Click and drag to highlight the disk identifier string and then press enter (you've now copied it into the clipboard)
6: Now type: wbadmin enable backup -addtarget:{identifierhere}
{identifiedhere} should be replaced with the string you just copied (right click, paste)
7: press enter and then select Y if you are prompted to overwrite

As usual when messing with backup disks and windows backup, double and triple check its the right disk before accepting!

And that should be it - keep an eye on on the screen after you add a disk as if the system doesn't think its big enough it will alert you.