File Level Backups for Vista/Win2k8

Fri, Jan 16, 2009

Technology

Recently I have been thinking about backup strategies for my various computers.  I have a couple of servers, couple of laptops, and a virtual server hosted by 1and1 that all could use a backup strategy.  A couple of requirements came up when I started looking at my options:

  1. File level selection – no need for volume backup
  2. Must run on hosted VPS – can’t install kernel level drivers on a VPS
  3. Must be able to run from command line syntax
  4. Must be free

In the past I have relied on a couple different VBScripts that could be scheduled with Task Scheduler and would fire off NTBackup.  This was a flexible and capable solution.  Unfortunately Vista and Windows 2008 has replaced NTBackup with Windows Backup Services.  A frustrating ‘feature’ of the new backup service is the inability to perform a file level backup.  The only choice you have is to perform a volume level backup.  I understand the need to simplify the Windows backup solution so that everyone can take advantage of the feature, but why not include an Advanced button?  Including an Advanced button could allow more experienced administrators to perform individual file backups.  So right away I realized I had to use NTBackup instead of the new Windows Backup Service.

A search across the internet reveals several people who have attempted to copy the old NTBackup to their Vista and Windows 2008 server in hopes that they could continue using NTBackup.  It sounds like a good idea and some people have been able to achieve success on Vista, but I haven’t seen anyone successfully make it work with Windows 2008.  The problem usually stems from the following Eventlog error:

Volume Shadow Copy Service error:  Unexpected error calling routine CoCreateInstance

If you are familiar with this type of error you would know that NTBackup is using Volume Shadow Copy to backup files that are open and/or locked, and Windows 2008 does not appear to support the VSS calls that NTBackup is trying to execute.  You might be thinking to yourself that NTBackup has a checkbox in the Advanced tab that allows you to disable VSS during the backup.  Problem solved, right?  Well, not exactly.  Since Windows 2003 SP1 Microsoft has disabled the checkbox and updated the NTBackup code to ignore the option to disable VSS.  Why?  I’m not exactly sure, but what a bummer.

The Disable volume shadow copy option is no longer available in Windows Server 2003 Service Pack 1 (SP1) and in later versions. Additionally, the SNAP command-line option is ignored in Windows Server 2003 SP1 and in later versions.
Microsoft Technet Article

On a hunch I decided to pull out an extremely old Windows 2003 server disc (pre-SP1) and see if the NTBackup.exe file still allowed you to disable VSS.  Apparently it was a good hunch because the option was in fact enabled and you can choose to disable the VSS option.  I performed some tests from both the command line and the GUI and everything appears to work correctly.  So now I have achieved my overall goal.  A free, flexible, file level backup solution that can run on all the machines I manage.  Look at the bottom of this post for the files needed to run NTBackup without VSS.

One thing worth mentioning is the command line syntax used to disable VSS.  The argument you need to specify is /SNAP:off.  An example command line syntax that I use to backup a folder looks like:

ntbackup.exe backup
    "c:\ImportantData"
    /J “MyBackupJobName”
    /F “c:\backupfolder\filename.bkf”
    /SNAP:off
    /M normal
    /L:f
    /V:yes

NTBackup-PreSP1

Comments are closed.