Backup fails with a VSS (shadow copy) error
This page is intended for administrators whose backup of a Windows workstation or server fails with a VSS error. VSS (Volume Shadow Copy Service, the Windows shadow copy service) makes it possible to back up open files. When it fails, the entire backup stops. This page explains the messages, the common causes and the fixes.
Symptom
The backup stops at start-up. The report contains a line beginning with:
Error during backup:
It is followed by one of these messages, sometimes completed by the error code returned by Windows:
Error initialising VSS:Error creating a VSS image for "…":Error activating the snapshot set:Error validating the VSS images (1):vssGetResult error:Timeout waiting for the DoSnapshotSet result(shadow copy creation took more than 30 minutes)Timeout waiting for the VSS service to start.Timeout waiting for the bbVss service to start.
Two messages point directly to a conflict between backups. They only appear after a long wait (see "What the agent already does"):
Timeout waiting for the backup instance controlling the VSS module to finalise the snapshots (1).followed byAvoid scheduling several backups at the same time.Another backup instance using VSS is already running.
Cause
At the start of a backup, the agent asks Windows for a shadow copy of each local volume to be backed up. Files are then read from that shadow copy rather than from the live disk. If Windows cannot create the shadow copy, the agent stops the backup. It does not fall back on its own to a backup without a shadow copy.
The most frequent causes are:
- two BeBackup profiles starting at the same time on the same machine;
- another backup product using VSS at the same time;
- a blocked Windows VSS service;
- a VSS writer (an application component, SQL Server for example) in an error state.
What the agent already does
The backup that initialises VSS on the machine restarts the Windows VSS service and its own bbVSS service. This avoids most VSS errors. A backup that joins an initialisation already performed restarts nothing.
If the list of writers remains blocked, the agent also restarts the "COM+ Event System" service and retries once. The report then carries this information line:
VSS and "COM+ Event System" services restarted to unblock VSS.
This behaviour has a consequence. Another product using VSS at the same time may be disrupted by this restart, and the reverse is equally true.
When two BeBackup profiles on the same machine start together, the second reuses the shadow copy of the first. If it cannot, it releases VSS and waits, for up to 90 minutes, for the other backup to finish, then starts again. The conflict messages only appear beyond this waiting period.
When another product is in the middle of taking a shadow copy (Windows code 0x80042316), the agent retries every 30 seconds for 10 minutes before giving up with Error activating the snapshot set:.
Checks
Carry out these checks in order.
- Look at the start time and duration of the profiles on the machine. The conflict messages quoted above appear when a backup has had to wait more than 90 minutes for another.
- Check that no other backup product is creating VSS shadow copies at the same time. An
Error activating the snapshot set:line after 10 minutes of attempts is the usual sign. - Check that the
bbVSSservice is installed and started on the machine. It is installed alongside the agent on Windows. - List the machine's VSS writers with the following command, in a command prompt opened as administrator, from the agent folder:
bbAgent.exe -CommandLine -ListVssWriters > writers.txt
This command goes through the bbVSS service, which it starts if it is stopped. If the list remains blocked, it may restart the bbVSS, VSS, SQLWriter and "COM+ Event System" services: do not run it during a backup.
If it remains blocked or returns an error, cross-check with the Windows command vssadmin list writers. If that one also fails, the problem lies with VSS itself. If it succeeds, the failure comes from the bbVSS service: restart it, or reinstall the agent.
- Restart the machine. A restart resets every service related to VSS.
Fix
Space out the backups
If a backup often waits for another to finish, schedule the profiles of a given machine at different times. Do the same with other products that use VSS: these are the most frequent source of conflicts.
Increase the VSS timeout
On a heavily loaded server, shadow copy creation may exceed the agent's timeout. You can increase it with the ipcVssExecuteTimeoutMinute option, expressed in minutes. Enter it in the Advanced agent options field of the backup settings, in the form ipcVssExecuteTimeoutMinute= followed by the number of minutes.
Disable VSS as a last resort
If VSS does not work on a machine and you cannot repair it, you can disable its use:
- in the agent:
Additional settings...,Disable open file backup (VSS)checkbox; - in the web interface, agent configuration:
Disable VSScheckbox.
Without VSS, files are read from the live disk. A file open for writing during the backup may be backed up in an inconsistent state, or not at all. The VSS components of applications (SQL Server, Exchange, Hyper-V) can no longer be backed up. Re-enable VSS as soon as the problem is resolved.
If the problem persists
If the error recurs on every backup while no other backup is running, contact BeBackup support. Please attach:
- the report of the failed backup;
- the
writers.txtfile produced by the command above; - the agent service log,
bbAgent-service.log.
BeBackup is backup built for IT service providers
Backup and restore of workstations, servers, virtual machines and Microsoft 365, encrypted at source with a key we do not hold, on the hosting of your choice.