Open Files Backup with Volume Shadow Copy Service


Posted on 07/04/2008, 08:16 by Calin Pasc

With Titan Backup version 2.1 we introduced a major improvement: support for backing up open files using the Volume Shadow Copy Service (VSS), which is part of Microsoft Windows. In this article we will not describe technical details about how VSS works, but if you want to find out more about it, a good starting point would be here:
http://technet2.microsoft.com/windowsserver/en/library/2b0d2457-b7d8-42c3-b6c9-59c145b7765f1033.mspx?mfr=true

The main goal of this article is to inform you, the Titan Backup user, about the requirements and restrictions of VSS and to provide a set of measures that can be taken to fix VSS when it is not working properly.

VSS requirements:

- You must have at least Microsoft Windows XP with SP1 installed. All subsequent versions of Microsoft Windows come with VSS.
- You must have a 32-bit or 64-bit (x64) version of Microsoft Windows installed (Titan Backup does not support backing up open files using VSS on the IA64 architecture yet)
- You must have Administrative rights to be able to use VSS (on Windows Vista and Windows Server go to the Options window in Titan Backup. Click General Settings on the left-side panel and select the Ask for Administrative rights at program startup option. Click OK and close Titan Backup. Double-click the Titan Backup desktop icon or double-click Launcher.exe in the Titan Backup installation folder and the program will prompt for Administrative rights if you have UAC enabled)
- The files you want to backup must reside on a NTFS formatted partition. A internat FAT32 drive can be saved only if you also have an NTFS partition available.
- The files you want to backup must reside on local disks (or external hard drives that report themselves to Windows as local disks).

Open files backup using VSS does not work for mapped network drives, shared LAN folders that are selected as source in your Backup Task, for software mounted virtual disks or for removable disks ( like USB sticks ).


VSS problems:

Although VSS is a great service which provides access to files that are open by other applications and normally cannot be saved, it has the bad habit of breaking down easily. And when that happens it is quite as hard to fix it.
There are various reasons that can cause VSS to break down. For example, somehow I managed to break the VSS on a computer by simply reinstalling Microsoft Office and then installing Microsoft ActiveSync. One of my co-workers cannot backup open files on his C: drive using VSS while the Microsoft SQL Server services are running but as soon as he stops those services everything works fine. In other cases installing some antivirus products and even other backup products can cause problems with VSS.

Below there are given several steps which can be taken to try and fix VSS. Please take your time to perform all of them correctly.
We will try to help as much as we can, but if all the steps described below fail, there is very little we can do about it. A search on the Internet might help but I'd suggest you contact Microsoft support in this case as VSS is part of Microsoft Windows, not Titan Backup.
Please note that we tried to log VSS errors when running a Titan Backup Task exactly how they are returned by the service so that you, the user, should be able to do a more accurate Internet search for the error and and find a fix for it; for example if you see in your Task log an error like "Volume Shadow Copy error: VSS_E_UNEXPECTED", an Internet search for it should immediately pull some results.

1. Install latest updates

- Please make sure you are using the latest version of Titan Backup. You can download and install it from http://www.titanbackup.com/download.html

- Please check that you have installed the latest Windows Updates. If you are running Windows Server 2003 ther a few updates for VSS you should install:
http://support.microsoft.com/kb/891957
http://support.microsoft.com/kb/833167
http://support.microsoft.com/?id=826936

2. Check the required services are running properly

- Click Start->Run. Type services.msc and press Enter

- Scroll down to the item COM+ Event System and double-click on it
- Change the startup type to Manual, click Start to check if it can start properly, then click OK

- Scroll down to the item COM+ System Application and double-click on it
- Change the startup type to Manual, click Start to check if it can start properly, then click OK

- Scroll down to the item Remote Procedure Call (RPC) and double-click on it
- Change the startup type to Automatic, click Start to check if it can start properly, then click OK (note that this may not be possible if Windows Vista is being used)

- Scroll down to the item System Event Notification and double-click on it
- Change the startup type to Automatic, click Start to check if it can start properly, then click OK

- Scroll to the item MS Software Shadow Copy Provider (or Microsoft Software Shadow Copy Provider if you have Windows Vista installed) and double-click on it
- Change the startup type to Automatic, click Start to check if it can start properly, then click OK

- Scroll down to the item Volume Shadow Copy and double-click on it
- Change the startup type to Manual or Automatic, click Start to check if it can start properly, then click OK

- Restart your computer and see if open files are backed up properly

3. Re-register VSS files

Go to the command prompt (click Start->Run type cmd and press OK), and type the following: vssadmin list writers
This should output a list of writers and their status. They should all be reported as stable (you may need to scroll up to see the entire list).
If some aren't listed as stable or you receive an error, then there is a problem with your Windows installation and you will need to re-register the VSS DLL's.

Now type the following command: vssadmin list providers
It should list at least one item (MS Software Shadow Copy provider). If none are listed then there is a problem with your Windows installation and you need to re-register the VSS DLL's.

To re-register VSS DLL's and providers, download the following batch file to your desktop then run it as an Administrator (if you're using Windows Vista then right-click on the batch file and select Run as administrator from the pop-up menu): 
Download & run fix-vss-reg.bat

 4. Registry settings

This step implies changing Windows Registry settings. Be very careful when editing the Windows Registry as it can render your system unusable.

Click Start->Run, type regedit and press enter.
Navigate to the key: HKEY_LOCAL_MACHINE\SYSTEM\Setup
If the value SystemSetupInProgress is set to anything other than zero then double-click it and set it to 0
If there is a value called UpgradeInProgress and it is set to any other than zero, then double-click it and set it to 0

Exit the registry editor, restart your computer and run your Backup Task again.


5. Check the Event Log

You should also check the Windows Event Log (Control Panel -> Administrative Tools -> Event Viewer) to see if there are any errors related to VSS.


5.1 In some situations Visio, which is part of Microsoft Office 11 aka 2003, can cause VSS to fail. You should see the following entry in your Event log:

Event Type: Error
Event Source: VSS
Event Category: None
Event ID: 5013
Description:
Volume Shadow Copy Service error: Shadow Copy writer ContentIndexingService called routine VsServiceChangeState
which failed with status 0x8007041d (converted to 0x800423f4).

If this is the cause then:

- Click Start->Run, type regedit and press Enter
- Delete the key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex\Catalogs\Visio
Exit the registry editor, restart your computer and run your Backup Task again.

If that doesn't work you may want to try disabling the Indexing Service in Windows (this does not apply to Windows Vista). To do this:

- Go to the Control Panel (Start->Control Panel)
- Double-click the Administrative Tools icon (you must be in Classic View mode)
- Double-click the Services icon
- Scroll down to the item Indexing Service and double-click the line
- Change the startup type to Manual, and click Stop, then click OK

Exit the registry editor, restart your computer and run your Backup Task again.


5.2. If you find either of the following in the Application Event Log then go to this web page to fix it:

Event Type: Error
Event Source: VSS
Event Category: None
Event ID: 5013
Date: 8/19/2005
Time: 10:38:14 PM
User: N/A
Computer: ComputerName
Description: Volume Shadow Copy Service error: Shadow Copy writer ContentIndexingService called routine RegQueryValueExW which failed with status 0x80070002 (converted to 0x800423f4).
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp
Data: 0000: 57 53 48 43 4f 4d 4e 43 WSHCOMNC 0008: 32 32 39 32 00 00 00 00 2292.... 0010: 57 53 48 43 49 43 00 00 WSHCIC.. 0018: 32 38 37 00 00 00 00 00 287.....

Event Type: Error
Event Source: VSS
Event Category: None
Event ID: 12302
Date: 8/19/2005
Time: 10:38:14 PM
User: N/A
Computer: ComputerName
Description: Volume Shadow Copy Service error: An internal inconsistency was detected in trying to contact shadow copy service writers.
Please check to see that the Event Service and Volume Shadow Copy Service are operating properly.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp

5.3. COM+ problem

This does not apply to Windows Vista.

Go to the Control Panel, double-click the Administrative Tools icon, and double-click Component Services.
Keep expanding the Component Services tree until you get something like:
Component Services->Computers->My Computer->COM+ Applications->MS Software Shadow Copy Provider->Components->VSSW.VSSoftwareProvider.1

If you don't see the item VSSW.VSSoftwareProvider.1 then right-click on the Components item (the one below MS Software Shadow Copy Provider), and select
New->Component from the pop-up menu. Click Next, then click the Install components that are already registered button. Select VSSW.VSSoftwareProvider.1
from the list that appears and click Next.

If you cannot see VSSW.VSSoftwareProvider.1 in the list, then click Cancel, and New->Component from the pop-up menu. But this time click the
Install new component(s) button. You then need to select the file C:\Windows\System32\swprv.dll and click OK then click Next.
You need to try and start the services above again.

5.4. Other COM+ problems

It may be that you have a damaged COM+ catalog. Follow the instructions on this page to try and fix it (does not apply to Windows Vista):
http://support.microsoft.com/default.aspx?scid=kb;en-us;315296

There is another set of instructions here:
http://www.jsifaq.com/SF/Tips/Tip.aspx?id=6951

Restart your computer and run your Backup Task again.


5.5. Sqllib error: Failed to create VDS object. hr = 0x80040154

If you see the error Sqllib error: Failed to create VDS object. hr = 0x80040154 in your Application Event Log then please see the following Microsoft KB article:
http://support.microsoft.com/?id=830575

 

 

Comments (3):
1.
vss
Posted on 07/28/2008, 15:42 by richard november
why not run at a cmd prompt vssadmin list writers to see if all are stable or errors. if error then net stop vss and net stop swprv and re register vss service dll\'s use the reg.bat file in article
2.
Open Files backup
Posted on 10/20/2008, 16:36 by Kelvin Bennett
Does this software allow you to backup an open .pst file?
3.
backup open .pst files
Posted on 10/28/2008, 04:52 by Titan Backup Support
Yes, if the VSS is working correctly, Titan Backup can backup open files.

Add a comment

Place a comment by filling the form below (maximum 1200 characters).

Name
Subject
Text from image
Comment