So it’s official that with all of the nice new features and pretty things in Vista that the new backup utility sucks especially if your interested in scheduling things from the command line.
Reason? The new Vista backup utility only allows you to backup entire volumes or specified mount points using their GUID, so what happens if you want to backup only a few selected folders?
The answer is to use NTBackup from Windows XP or Server 2003, however this isn’t as simple as copying the ntbackup.exe file from the XP System32 directory.
Daniel Petri as usual has done a service to the community and written an article on working around the requirements and getting NTBackup to work.
You can read the article at http://www.petri.co.il/installing_windows_xp_ntbackup_on_windows_vista.htm however one thing that this article doesn’t point out is a problem I was running into when trying to run my backups.
The 1st issue is that when using a scheduled backup you will most likely have a .bks file which holds the directory listing for the locations to backup. My .bks file contained a line called SystemState which means to backup the SystemState. The SystemState includes the registry, COM+ applications, environment settings etc. In Vista the SystemState is different to XP or 2003, so you must remove this option from your backups.
The second issue I encountered was that NTBackup would start but hang. As I am running the backups using the SYSTEM account by scheduling them using the AT command I was unable to see what was happening. When I tried a few different things, I ran my batch script manually to see the results and NTBackup was hanging at the first part of the backup operation, initializing the VSS (Volume Shadow Service) which is the method for Windows to backup files which are currently open, active or otherwise locked. I found that turning off VSS for the backup fixed the problem and allowed the backup to run.
To disable VSS, you need to add the /snap:off parameter to your script which kicks off the backup process.