Open File Backup Considerations

Back Up Open Files in Windows with VSS

Overview

UTBackup supports backing up open files in Windows. It uses the Volume Shadow Service, VSS, which is built into the operating system. This is the same service that NT Backup uses.

How It Works

Briefly, here's how we coordinate with VSS to back up open files:

  1. UTBackup starts back up.
  2. UTBackup fails to back up an open file.
  3. UTBackup requests a snapshot from VSS for all local drives.
  4. VSS sends a freeze to all registered “writers,” such as, Exchange, Outlook, SQL Server.
  5. Writers flush their state to disk.
    Note: if an application isn't a known writer then it may or may not work. The application isn't given a chance to flush its state to disk. The snapshot will be exactly as it exists on disk.
  6. VSS creates snapshot.
  7. VSS provides UTBackup with details to access the new snapshot.
  8. UTBackup backs up ALL files using the snapshot until it reaches a file that changed more recently than when the snapshot was created or the back up session finishes.

For more details see the following article from Microsoft MSDN: http://technet.microsoft.com/en-us/library/cc785914.aspx

Limitations

Using VSS allows us to back up open files which is a huge win. However, VSS has some restrictions and limitations. For instance, the program that is writing to the open file needs to support VSS, not just UTBackup. In addition, here some other conditions that must exist for VSS to be successful.

  • Volume Shadow Service must be enabled.
  • There must be devices enabled and associated to the Volume Shadow Service.
  • Only Windows XP, Windows Vista, Windows Server 2003, Windows Server 2008, Windows 7 support VSS.
  • Only local disks are supported.
  • An NTFS partition must exist on an internal drive, with at least 100MB free space for the shadow copies.
  • Free space must be available on drives containing locked files.
  • In Windows XP only one shadow volume can be created per drive at any one time.

In addition, VSS is known to fail if there is too much disk activity.

You may see the message “Unable to backup x files (next attempt within x minutes)” in the history if UTBackup is unable to back up an open file via VSS. In this case it will try again later and may succeed if the file has become closed.

Applications Known to Work

These applications appear to support VSS back up and restore based on customer feedback or on our testing. However, we do not guarantee anything. Please comment below if you know of any other applications that you have seen back up consistently and restore reliably to a usable state.

  • Outlook 2003
  • Outlook 2010

If your outlook.pst files are stored on a volume that does not support VSS, you can use the automated tools mentioned at the bottom of this page.

UTBackup will happily backup the exports and keep a version for each. This is a good way to reduce UTBackup resource usage when your outlook.pst files are constantly changing.

Applications Known to Fail

These applications do not appear to work with VSS. They may back up but the file(s) may not restore to a usable state for the application. We suggest these applications be closed before back up, or use a known method to back up the application files and then use UTBackup to back up the backup. You can also disable the “Back up open files” option so that UTBackup makes hourly attempts until it no longer detects that the file is open and then backs it up.

  • Exchange
  • SQL
  • QuickBooks (not sure which version failed, all are suspect)

Supported OS Versions

32 and 64-bit versions of the following operating systems:

  • Windows XP
  • Windows Vista
  • Windows Server 2008
  • Windows Server 2003
  • Windows Small Business Server 2003

OS Versions Known to Fail

  • Windows Server 2000

Additional Technical Resources

Troubleshooting

Windows Server 2003

Service pack 1 is highly recommended for Windows Server 2003 and SBS 2003. See the following hot fixes from Microsoft.

Unable to Back Up XFiles

The message Unable to back up X files (next attempt within Y minutes) is an informational message and not a warning or error.

Normally, this means that UTBackup is unable to back up the file because it is locked open by another application and cannot use VSS to back up a copy. UTBackup continues trying to back up the file and it is backed up once it is closed.

You can view which files are not being backed up in the client's backup_files.log.0 file. A W at the beginning of the line indicates a warning and those files were unable to be backed up.

Unable to Connect to Backup Engine

If you are running Windows and you frequently receive the error “Cannot connect to backup engine”, you may need to disable the Back up open files option. On some machines when UTBackup tries to interface with Microsoft Volume Shadow Service to back up open files, the application crashes. This only happens on some machines and we are investigating the root cause.

  1. Launch UTBackup UI
  2. Go to Settings > Backup > Advanced backup settings > Back up open files (uncheck)

Floppy Drive Light

There is a known issue within Windows where your floppy disk drive's light may blink when a program uses VSS to make a copy of an open file. You can disable the floppy drive from the Windows Device Manager if you'd like to stop the blinking. There's more information about using Device Manager on Microsoft's support site.

Failing to back up open files and I see 0x8004230f error in logs

If you see the following in your logs:Volume C:\ not supported. COM object method returns error code: *0x8004230F*This is really an unexpected provider error. It comes from Microsoft VSS. The Microsoft default provider is very reliable and we suspect it may be a 3rd party VSS provider that may be causing the issue.

This may be caused by the following:

  • TrueCrypt encrypted drives
  • Disk partitioning utilities like Acronis (cloning process may cause VSS system to fail)
  • Defrag running at the same time

First make sure that you have “DEP for essential windows programs and services only enabled”.

  1. Control Panel > System > Advanced > Performance Settings > Data Execution Prevention
  2. Select the “Turn on DEP for essential windows programs and services only”
  3. Click Apply / OK.

If that doesn't help then try the following:Net stop vss
Net stop swprv
regsvr32 ole32.dll
regsvr32 vss_ps.dll
Vssvc /Register
regsvr32 /i swprv.dll
regsvr32 /i eventcls.dll
regsvr32 es.dll
regsvr32 stdprov.dll
regsvr32 vssui.dll
regsvr32 msxml.dll
regsvr32 msxml3.dll
regsvr32 msxml4.dllIf that doesn't work then please send support the results of the following commands (cmd.exe):C:\> vssadmin list providers
C:\> vssadmin list shadows
C:\> vssadmin list writers