Bryan Soltis

Senior Software Engineer

Windows Server 2008 Backup to a network share

Posted on September 23, 2008

With the installation of Windows Server 2008 comes with it the new Windows Server Backup utility.  This application replaces the ntbackup.exe from years past and gives many new features and abilities to network administrators.  However, with it also so comes some changes and shortcomings.  Specifically, the ability to work with a network drive as the backup location.

Windows Server Update has the ability to backup an entire OS to a specified location.  The system, through “Scheduled BackUps”, will perform full and incremental backups of that server.  This is done by specifying a local hard drive to the machine.  This drive will be completely formatted and then the backup will be placed on that drive.  From that point on, incremental backups will be placed on that drive detailing a history of the files and maintaining its own disk size.

This process works great, if you have a local drive.  However, try using a network drive as your backup location.

Windows Server BackUp will allow you to backup to a network share when performing a “Manual BackUp” of the system:


Completing this process will result in a full backup being performed on the system to the specified network drive. 

The issue is that Windows Server Update will only allow you to schedule a backup to a local drive.   The option to save the backup to a network share is not even available.  I even tried to map a network drive but that failed as well.  The system requires that a physical hard drive be present with no operating system files installed on it to allow a backup to be placed on it.


To get around this, I did the following:

I used the following command line syntax:

Wbadmin start backup -backupTarget:\\[Server]\[Share name] -include:C: -vssFull -quiet

That command will perform a complete backup on the server without any user interaction.  I saved that command as a batch file.  I then setup a scheduled task to execute that command on a daily basis.

This process will work fine, except every time the batch file runs it will create a full backup, over writing the existing backup.  Incremental backups are not an option when using the command line or the GUI.  Windows Server Backup is egineered to recognize when a full backup has been completed and incrementally backup the files after that.  Seeing how this is a "manual backup" that I have scheduled, everytime it runs it assumes there is no pre-existing backup and performs a full backup instead. Ideally, we would schedule a full backup of the system to the network share once, then have daily incremental backups of the systems from that point on.  This process is not supported in Windows Server Backup. 

And if you thought of just using ntbackup.exe on Windows Server 2008, guess again.  Microsoft has released a tool to allow Windows Server 2008 to read ntbackup.exe backup files, however, it will not backup any new files.

I contacted Microsoft support regarding this issue but they were clueless.  I find it hard to believe that every company will be backing up their servers to a hard drive on the machine.  Hopefully Microsoft comes out with a solution to this issue soon.

 

Comments
Gravatar
Blair 10/1/2010 2:47:09 PM
Thanks for this post. I was about to abandon the otherwise superior server backup solution for something half assed. But this made it work
Gravatar
Amir Fasad 10/1/2010 2:48:14 PM
Excellent article. Perfectly describes the issue that we encountered. I'm just as surprised as you are that MS has no idea about this situation. We've tested Server 2008 extensively, and it seems like almost everything is two steps forward, one step back. Nice new features promised, but setbacks from earlier functionality that always worked fine and didn't need to be tampered with.

We've had to shelve 2008 Server for production systems for the time being, and go back to 2003 Server. Just way too many bugs, glitches, and hiccups to be usable on our production machines.
Gravatar
Lee 10/1/2010 2:52:08 PM
Another option is if your network drive is iScsi ready, you can setup the iscsi connection and Windows server backup will see that at a local drive.
I'm doing that with one of our servers and a Thecus NAS, seems to be working well so far.
Gravatar
Slavko 10/1/2010 2:53:00 PM
Thank you for this post. It's exactly how I would try to resolve this issue, storing Windows Server 2008 backup on the network drive. I followed the suggestion, created batch file to create backup on the network, and when I run it interactively (by running batch file), it's just fine and network backup is performed. But if I schedule task by running Task Scheduler, it always fails, so I'm not able to perform backup on the network drive ...
Gravatar
Bryan Soltis 10/1/2010 2:53:58 PM
I think your scheduled task is failing due to authentication. Instead of a network share, you could try mapping a drive from the host server to the network drive. This may allow the scheduled task to run without error. Or, you could try a network admin account for the scheduled task, if you're not already doing so.

I've run into similar issues when scheduling tasks across a network and have had to get "creative" in my solutions.
Gravatar
Slavko 10/1/2010 2:54:23 PM
Hello, Bryan!

Thank you for the fast reply and suggestions. Do I understand correctly that you're suggesting mapping network share locally and then performing Windows Server Backup? If I try to do that, I got following error:

The backup cannot be completed because the backup destination is a shared folder mapped to a drive letter. Use the Universal Naming Convention (UNC) path (\\servername\sharename) of the backup destination instead.

I get this error if I run wbadmin interactively ... Permissions should not be an issue, as in my testing environment I'm logged on as domain administrator and Everyone has full permissions to network share...

I have created two simple .bat scripts, just to make sure that there is no permission problem. First one reads:

c:\windows\system32\wbadmin.exe start backup -backuptarget:\\192.168.1.1\backup -include:c: -vssfull -quiet

Second script is simple:

copy c:\windows\system32\notepad.exe \\192.168.1.1\backup

If I run either of this two scripts interactively, it runs fine and it produce expected result (I'm logged on as domain administrator). If I create scheduled task which run second script, it produce expected result (notepad.exe is copied to network share). But if I modify Scheduled Task and select first task as the action, it does not create network backup (last run result is 0xFFFFFFFE). Scheduled Task is configured to run in the context of domain administrator and if I run .bat interactively, it creates backup on the network.

I expect Lee's solution to work, but I don't have iSCSI NAS ...
Gravatar
Bryan Soltis 10/1/2010 2:54:41 PM
I've run into similar issues with the scheduled task, as well. In my searching, I did come across a program called BackupAssist which looked promising. I haven't used it since the new version was released, but at the time they said it would fill in many of the gaps left by Microsoft's backup solution.

http://www.backupassist.com/index.html

Best of luck.
Gravatar
David Gordon 10/1/2010 2:55:29 PM
Great advice. Helped so very much. Thanks.

Best Wishes, D.
Gravatar
attiks 10/1/2010 2:55:52 PM
If you get error 0xfffffffe, try checking 'run with highest privileges', it worked for me
Gravatar
Nicolaj Rasmussen 10/1/2010 2:56:15 PM
Hi, have you tried the registry hack in KB944530?
I'm not sure if it also changes the behaviour to allow UNC backup, I haven't tested it yet.

http://support.microsoft.com/kb/944530/en
Gravatar
Bryan Soltis 10/1/2010 2:56:42 PM
Nicolaj,

That article seems to discuss only system state backups which was a little different than what we needed. However, it does seem to provide some good info and the fact that it's a Microsoft KB gives me a little more confidence in it.

Thank you for the tip!
Gravatar
MichaelD! 10/1/2010 2:57:15 PM
WOW I am right there with you when you say that it is BAFFLING why network share-backups are only one-shot, and not SCHEDULED... WHAT WERE THEY THINKING?!
Gravatar
Paul 10/1/2010 2:57:39 PM
Microsoft was thinking about all the money they would be making from there new DPM software that they are selling... They pretty much took NTBACKUP's capabilities out of Windows server 2008 and created a new seperate product called DPM that runs around $600 per server. I do hope microsoft gets its head out of its rear and see's that they are causeing a very large reduction in their overall sales of windows server 2008 not to mention exchange server 2007 thanks to this idiotic plan they came up with to force people to pay for backup software that should and has always been a free feature included with windows
Gravatar
Nicholas Piasecki 10/1/2010 2:58:13 PM
Thanks for posting this. I agree; Microsoft has gone completely bananas on this one.
Gravatar
Yoan 10/1/2010 2:58:34 PM
I just made 1 try to backup only the directories that I need, so I'll give the expample (it works!):

xcopy "C:\Users\Administrator\Documents\*" \\server02\shared_folder /Y /Q /S /H
xcopy "C:\Users\Administrator\Pictures\*" \\server02\shared_folder /Y /Q /S /H

you can put as much rows as you want, so you can start giving many directories to backup in just one .bat file that you will put as daily task ;)
Gravatar
MichaelD! 10/1/2010 2:58:54 PM
BackupAssist FTW... It really is worth the moolah you pay for it. It does everything.
Gravatar
Homeserve J 10/1/2010 2:59:26 PM
Taking NTBACKUP's capabilities out of Windows server 2008 and creating a new seperate product called DPM which costs the earth is not customer focused .... wait its Microsoft isn't it and this is a way of generating more revenue.

Looks like I need to learn how to script xcopy
Gravatar
naYS 10/1/2010 3:00:03 PM
It really is worth the money to pay for backupassist. Try it out!
Gravatar
Gerry Kirby 10/1/2010 3:00:23 PM
What happens when the backup disk for W2008 Backup fills up? I have read the older backups are then overwritten. Excellent I said, but then realalised the 1st backup is the only Full backup and subsequent backups are incremental!!!! What happens in this case? Should the backup be amended to only use FULL backups? This is a bit wasteful.

GK
Gravatar
Fatshark's Personal Blog 10/1/2010 3:01:00 PM
Windows Server 2008 Backup to a network share

With the installation of Windows Server 2008 comes with it the new Windows Server Backup utility. This application replaces the ntbackup.exe from years past and gives many new features and abilities to network administrators. However, with it also so co
Gravatar
Chris 10/1/2010 3:01:26 PM
It is possible to use NTBackup on Windows 2008 (though not supported). The catch is that ShadowCopy is not available on Windows 2008 so it won't work for open files...

Have a look at this article for more information.
www.dscoduc.com/.../...ackups-for-VistaWin2k8.aspx
Gravatar
Bryan Soltis 10/1/2010 3:01:43 PM
Chris,

Excellent suggestion and link. W/O Shadow Copy, you'd lose a lot fo system files which would prevent restoring a complete machine. However, in some circustances you'd be able to get the applicaitons files and that would be a start.
Gravatar
Milford MA Real Estate 10/1/2010 3:02:13 PM
Thanks for this excellent article. I have often had difficulty with getting back ups taken care of. This should be most helpful! I have had a hard time figuring how to get around the local drive issue.
Gravatar
Website Design Manchester 10/1/2010 3:02:36 PM
Handy advice, its almost our backup time so this is getting given a chance. Time to get that command saved as a batch file and execute daily. Thanks for this.
Gravatar
Dui Indiana 10/1/2010 3:03:00 PM
This process works great.I used a network drive as the backup location.
Gravatar
Hari 10/1/2010 3:03:24 PM
Is it possible to shedule more than one backup in windows 2008. When I tried to do so, it prompted me to delete the existing shedule.

Please advice....
Gravatar
Joe 10/1/2010 3:03:53 PM
My Server 08 is case sensitive when it comes to drive letters.

Your Example failed

Wbadmin start backup –backupTarget:\\[Server]\[Share name] –include:C: -vssFull –quiet

But, a lowercase letter on C: did

Wbadmin start backup –backupTarget:\\[Server]\[Share name] –include:c: -vssFull –quiet

Maybe it's my server, just FYI
Gravatar
Anons 10/1/2010 3:04:11 PM
Anyone got an example of the bat file?

Something like

ECHO OFF
CLS
WBADMIN START BACKUP -backupTarget:"\\Elite-fs\Exchange Backup" -include:C:,D: -vssFull -quiet

Do you have to put a "wait" in? Or can the cmd window just close once the backup is running?
Gravatar
Gerardo 10/1/2010 3:04:34 PM
I have the same problem as Slavko created batch file to create backup on the network, and when I run it interactively (by running batch file), it's just fine and network backup is performed. But if I schedule task by running Task Scheduler, it always fails, I've tried all sorts of "creativeness" but nothing is working. I've tried batch file, I've tried running the command and passing parms. Moreover, what happens when the UNC has a password? I've tried adding an action to the task in which I prior to the batch/cmd I ran the cmd "net use \\server\share /user:domain\user_name passwd" that doesn't work!? Slavko did you fix it? How? Thanks.
Gravatar
Gerardo 10/1/2010 3:04:46 PM
I overlooked one of the options -password adding this option solved my problem.

batch file
wbadmin start backup -backupTarget:\\<machine>\<share> -include:<drives> -user:<user> -password:<domain>\<pwd> > c:\<path>\<logs>\log.log
Gravatar
Link Building India 10/1/2010 3:05:09 PM
I'm running an automated back on my Vista box that uses a share on my server for a target with the built-in Vista backup utility...So why the hell would they pull that (back) out for server?

Automated backups always use the Task Scheduler so that's not so much a work around as a dent in the wizard.

I'll play with this a bit later today (assuming I can find the time) ... Damn that's weird...
Gravatar
Locksmith 10/1/2010 3:05:33 PM
I have the same problem as Slavko created batch file to create backup on the network,and when I run it interactively,it's just fine and network backup is performed.<a href= "www.hobokenlocksmith.com">Locksmith</a>
Gravatar
Locksmith 10/1/2010 3:05:45 PM
Is it possible to schedule more than one backup in windows 2007?
--------------------------------------------------------------------
24 hours locksmith
Gravatar
lbennett 10/1/2010 3:06:09 PM
I just ran into this problem today. Does anyone know of a good open source backup program to get around this?
Gravatar
Jon 10/1/2010 3:06:27 PM
Does anyone know of a method to have the Server 2008 backup result emailed to me.I am using the built in Server backup
Gravatar
Bryan Soltis 10/1/2010 3:06:44 PM
Jon,

My initial recommendation would be to create a scheduled task that would execute a script. The script could be part of the job that performs the actual backup and is called when the backup script completes its execution.

One thing to note is that a backup will usually be quite large in size and emailing it may not be the most suitable method.

Let me know if you need any help with the vbscript and I'll be glad help you out.

-Bryan
Gravatar
sean 10/1/2010 3:07:13 PM
I haven't had a chance to test this yet as it still requires a dedicated drive which we dont have in our server yet although I think it should work within your dedicated drive create a symlink to a UNC path

e.g.

mklink /d networkshare \\unc-path\goeshere

this should create a folder on your dedicated drive linking to the UNC path, I think you should then be able to backup to this path and it will backup to the network location!
Gravatar
nofid 10/1/2010 3:07:35 PM
use runas function to impersonate the administrator and it runs fine
Gravatar
Dave 10/1/2010 3:07:53 PM
Just makes you want to beat one of these Microsoft developers to death, doesn't it? You take two steps forward, and they make you take one step back. Don't let me near anybody working on the wretched team that did this.
Gravatar
Rob 10/1/2010 3:08:13 PM
Damn Microsoft. I can't use a USB Drive on my servers because they are virtual using ESX 4.0. What am I suppose to do now?
Gravatar
User 10/1/2010 3:08:32 PM
Heres another solution for backing up to a network share, at least for Windows 2008 R2 - create a VHD on the network share and mount it locally, the backup will see it as a drive and let you schedule backups.
Gravatar
Adam 10/1/2010 3:08:52 PM
Hi Bryan,

Thank you so much for the helpful article! This really helped me get off and running with network backups for our 2008 Server.

One thing that might be helpful for others... The command line example on this page doesn't work directly (from a copy-paste) because it is using an mdash instead of a dash.

Took me a while to figure out why it wasn't working, but maybe a quick tweak on the HTML might save others the perplexing challenge.

Thanks again!
Gravatar
Bryan Soltis 10/1/2010 3:09:12 PM
Adam,

Sorry you had trouble with the example. I edited the HTML and used a normal dsah instead. Thank you for the comment!
Gravatar
Thomas 10/1/2010 3:09:34 PM
Thanks for the nice tip... But can I check whether it is possible to backup to a NAS? Can I know whether this is a full server backup or not and how we do the restoration from this backup?
Gravatar
Bryan Soltis 10/1/2010 3:09:51 PM
Running the command will create a full backup on the drive. You can use the Windows BackUp/Restore utility to restore form this. As for the NAS, as long as the resource is accessible by the server you should be able to backup to it.

-Bryan
Gravatar
BBrian 10/27/2010 8:38:55 AM
I just used Kernsafe iStorage Server to share a drive on one server over iSCSI. First backup should run at 9pm tonight, but it looks fine, even after a reboot of the server with the drive. The free version lets you share one drive/partition with one connection to it, which is perfect! Just remember, Windows Server Backup will want to format the drive.

http://www.kernsafe.com/product.aspx?id=5
Gravatar
Jim Smart 12/1/2010 10:58:29 AM
Hi guys, Im new at this forum / blog thing but I saw a question up the list IE What happens to the backup drive when it gets full, IS Windows Server BAckup smart enough to NOT remove the oldest backup being it is the Full first backup.?
Gravatar
Bryan Soltis 12/1/2010 11:03:12 AM
Jim,

Welcome! Typically with Microsoft's "free" products they are not very smart in terms of knowing what to do with a situation like that. I haven't encountered that situation personally, but have with SQL Server backups and the typical result is the backup will just fail and write an "out of space" message to the event log.

If you find anything different definitely let me know!

Hope this helps!

-Bryan
Gravatar
Jim Smart 12/1/2010 11:09:58 AM
Bryan, Thanks for the quick answer back. Well I guess I will find out this evening since my 500 GB backup drive has 2.97GB remaining.Of course being incrementals it may be a couple days before it hits the top. Woo Hoo I love anticipation! Again Thanks
Gravatar
Jeff Mendenhall 12/16/2010 7:09:18 PM
@Lee and @BBrian -- have you tested restore over iSCSI? How did you get the restore process to see the iSCSI drive?
Gravatar
Rolando M. 1/13/2011 9:51:51 AM
Hey Guys, this post was really helpful for me. I also found this at a technet website: http://technet.microsoft.com/es-es/library/cc742083%28WS.10%29.aspx.

The issue I have is that I have my virtual machine vhds in a d: drive. I have a c: drive that has the os stuff and a e: drive that is a recovery drive.

I ran this script: start backup -backupTarget:\\"nameoftheserver"\"nameofthedrive" -include:c:,d:,e: -vssFull -quiet.

Of course I removed the name of the server and the name of the drive but it has the name without quotes. The problem I am having is that I can successfully run this script for the c: and the e: drive but last night the D: drive timeout. Gave me this error: "Backup started at '1/13/2011 4:30:03 AM' failed as Volume Shadow copy operation failed for backup volumes with following error code '2155348001'. Please rerun backup once issue is resolved."
Gravatar
David R 3/6/2011 1:45:27 PM
This works great for me. We want to do daily backups, and it seems to work fine by creating a shared directory for each day of the week on the backup drive, then scheduling a series of seven weekly tasks (Mon-Sun) to do the backup.

Of course, I haven't tried RESTORING one yet ;)

Thanks for the article.
Gravatar
Ritesh 6/23/2011 2:27:11 AM
Thanks for helpful post.
As suggested on your post, you take schedule backup on different drive ( HDD ), But I want to take backup on another drive like " D: that is second drive on same disk ", Anyone suggest me that how to possible ?

Thanks
Gravatar
Syed Ashraf 6/26/2011 1:20:40 AM
I am unable to perform schedule backup on windows server 2008 to a network drive.However manual backup is working fine to a shared network drive.same thing when i schedule its not working.
Gravatar
Sammy 7/9/2011 11:18:18 AM
Using the batch/script method - how does one recover the complete server from the network drive?

Also, could one use ROBOCOPY? What would be the switches for a FULL backup, and then what switches would be for an incremental backup after?
Gravatar
Robert 8/2/2011 4:07:52 PM
Hey thanks for the great info.

Has anyone experimented with Powershell command line scripting for the backup? Might be more and better options that way???
Gravatar
jeff 8/21/2011 2:03:04 AM
my prob is it wants my FULL USB external 1 TB drive, EVEN after I partition it to 2 separate partitions - Microsoft, PLEASE FIX 2008 SERVER BACKUPS, so we can backup to a 'partition' vs. an entire multi-terabyte drive!

The ONLY option MS gives me is "Backup to Disk 1" - which is my entire external USB drive. What I would like is to be able to backup tp Disk1 / Partition 1. Ugh!
So, I guess I take an entire 1TB external and say "oh well."
Gravatar
peter 9/7/2011 8:07:57 AM
Guys i have an issue, with backing up to external tape drive using windows server backup 2008, is it possible to backup to external tape drive? how is that possible ?
Gravatar
Sooners 11/7/2011 10:04:12 AM
What about restoring these backups????
Gravatar
Catia 12/15/2011 4:05:10 AM
@Sooners: Restoring these backups is easy. Just launch Windows Server Backup utility and click on "Restore". This will launch a wizard allowing you to point to the backup location and choose many other restore options. Try it out and see for yourself (always test your backup plans and data!).

Just a quick note as well, Windows Server 2008 R2 supports scheduling of backups to a network folder, this issue is only present on Windows Server 2008.

Still, if you need to schedule different backups on same machine(say full server backup on weekend and selected volumes during the week) you'll always have to use a script to launch wbadmin for that extra backup task as the "Windows Server Backup" utility only allows you to configure one scheduled backup task (lame). Well, at least you can see the backup results listed on the Windows Server Backup utility for the backups that are being done through scripts (using wbadmin).


@peter: i don't see any option on the utility to point the backup destination as tape drive, maybe have a better look at the command-line reference for wbadmin and you might strike some luck.. still, since tape drives are old-news as far as backups go, I guess microsoft didn't bother to include this support on this free utility.

Cheers :)
Gravatar
Tony 1/9/2012 10:33:06 AM
The article and comments helped. Thanks. My solution to the problem was as follows;

I created a vhd on the machine that had the spare capacity. I then put this in a network share.

I then attached the vhd to the machine I needed to backup (Right click Computer\Manage. When the Computer management console pops up goto Storage\Disk Management. Right click this and select Attach vhd. In the window that appears select the network share where the vhd is and attach it.)

When you next run Server backup wizard you will be given the option to use this disk, it will then format it and use it as a normal disk.

Want to join the conversation?  Leave a comment using the form below!



 Security code