Skip to main content
All CollectionsKnowledge BaseEndpoint and SaaS AppsTroubleshooting - Endpoint and SaaS Apps
How VSS works and how to troubleshoot common VSS Issues in Insync
How VSS works and how to troubleshoot common VSS Issues in Insync

How VSS works and how to troubleshoot common VSS Issues in Insync

Updated over a month ago

Overview

Volume Shadow Copy Service (VSS) is a feature that creates shadow copies of a file system to ensure that data is written in a consistent order and metadata is recorded correctly. Here's some information about how VSS works and how to troubleshoot common VSS issues in inSync:

Architecture Explained in detail. You can refer to the Microsoft article: Volume Shadow Copy Service

  • How VSS works
    VSS works by flushing the file system buffers, freezing the file system, and then creating a shadow copy. The shadow copy creation process takes no more than 10 seconds.

  • How inSync uses VSS
    InSync uses VSS to create a snapshot of backup folders when a backup starts. InSync then creates a backup of the snapshot. If the snapshot creation fails, the inSync backup will also fail.

  • Troubleshooting VSS issues
    If you're having trouble with VSS, you can try resizing the shadow storage. You can do this through the volume's properties interface or by using an admin command prompt.

How does Insync leverage VSS to take a snapshot?

  • For endpoint backups inSync uses USN Journal (USN Journal ) to find the changes of the file to perform point in time snapshot of the files which are eligible for backup.

  • To accomplish this, we leverage Microsoft VSS Technology to perform a snapshot. Once the snapshot is taken, we synchronise the data to the druva AWS Storageserver.

inSync uses either of the following methods for volume backups:

  • Backup using VSS: When backup starts, inSync creates a snapshot of backup folders using VSS. inSync creates a backup of this snapshot. If the snapshot creation fails, inSync backup also fails. inSync does not take volume backups from the file system.

  • Backup from live data: inSync backs up data by reading files from the file system. If inSync detects a locked file, it creates a snapshot of the locked file and creates a backup of the locked file. If the snapshot creation fails, inSync does not back up the locked files.


💡 Tip

By default, backup using VSS is enabled.


Backup process

Considering the above scenarios, inSync uses one of the following methods to back up:

  • VSS snapshot gets created at the beginning of backup of a particular share. If inSync fails to create a snapshot, it triggers a live data backup.

  • Backup fails immediately if inSync encounters a VSS related error while reading the stats/data. It does not fall back to live data backup.

How to troubleshoot VSS Issues?

  • On the command prompt, type vssadmin List Writers,to know if the VSS writer is in running and stable state.

  • Make Sure that the VSS Service is in running state. If its stopped, restart the service once or reboot the machine to get the writers in stable state.

  • If the writers are still showing errors or is in a failed state, Check the Event viewer to know the exact cause of the issue.

  • If the writers are stable check for pre-existing snapshots, there should be none: vssadmin list shadows

  • If there are snapshots listed, delete them: vssadmin delete shadows /all and try running the backup again.

  • As a best practice, make sure that the volume to which you want VSS to write shadow copies has sufficient free space. We recommend that you configure VSS to write shadow copies to a separate volume assigned for this purpose.

  • For example, if you want to store shadow copies of folders on D drive to the C: drive, and you want to allow VSS to use up to 90% of the free disk space on C:, the command might look like this: vssadmin add shadowstorage /for=d: /on=c: /maxsize=90%

Few of the useful VSS commands

Few of the Use Cases where InSync client Fails to Backup due to VSS Issues:

There are issues with Endpoint Backups, where you can see that VSS (volume shadow copy Service) is failing to take a snapshot. In such cases, our backup may fail due to VSS error. Please refer to the Backup logs under the following directory.

Insynclient log in the following location: C:\ProgramData\Druva\inSync4\Users\<user name>\logs\

Log Snippet from Insynclient log

[WARNING] Err in creating snapshot. Retrying again... Err: Windows VSS failed to create a snapshot for b'C:\\' at step 3, status 0x80042302[A Volume Shadow Copy Service component encountered an unexpected error.]. (#100000036)

This could happen mainly due to some common issues:

1. Unstable VSS writer

2. Corrupted writers

3. Insufficient space to create a snapshot.

4. System is busy or it has low resources and many more reasons.

Recommendation:

Please contact Microsoft to fix the Backup issue as Druva uses VSS to take a snapshot.

Check the VSS writers status: vssadmin list writers

Example:c:\>vssadmin list writers

vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool

(C) Copyright 2001-2012 Microsoft Corp.

Writer name: 'System Writer'

Writer Id: {e8132975-6f93-4464-a53e-1050253ae220}

Writer Instance Id: {34a07e16-fcdb-4ab0-b603-d58c0f741c9a}

State: [1] Stable

Last error: No error

NOTE: The above output is an example of one of the writers; however, ALL writers should be Stable, No error.

Different VSS-related problems that occur during backup and restore.

Did this answer your question?