I’ve been having some doubts with this topic, so I decided I could use some advice. I’ve been using VSS for all my Windows backups with great success for a long time. However, there’s one drive that always produces the following output:
creating VSS snapshot for [e:\]
error: failed to create snapshot for [e:\]: VSS error: Snapshots are not supported for volume e:\
The drive in question is an SD card connected through a USB adapter, so I’m not surprised VSS cannot generate an snapshot for it.
The thing that puzzles me is that the paths inside E: somehow end up in the final restic snapshot. I’ve even tried to recover files from these snapshots several times and the contents are indeed correct.
This is why I wanted to ask: what happens when a VSS snapshot fails? Does restic perform a regular snapshot? Is this something I can rely on or, taking into account the error message, perhaps it’s better for me to move the stuff I have in E: to a regular drive and backup that one instead?
TL;DR: Whether it could be a problem is entirely down to what files you are backing up on that E:.
I think you already answered your own question
You have verified that the files on E: are backed up, referenced by the snapshot in your restic repository, and you have verified that they can be restored successfully, despite restic saying it was unable to create a VSS snapshot for them.
Hence, restic backs them up anyway, it just cannot do so using a VSS snapshot. Instead it reads them from the regular filesystem. Yes, it creates the same type of snapshot in the repository regardless of wether or not it can use VSS when backing up.
Since the point of a VSS snapshot is to have a “frozen” point in time view of the filesystem, the practical effect of this is that the files you back up without a VSS snapshot may not have the same level of consistency.
For example, if restic is backing up E: which contains two related files, then it would be possible that the second file changes before restic gets a chance to back it up, after restic backed up the first file. Hence, they may be inconsistent with each other. Restic backs up what’s on disk, it cannot know about the relationship between different files. This is hardly a problem in most cases, it’s usually only a matter with things like databases, which you probably don’t have no that USB drive anyway.
I wonder if this should be a warning instead of an error
I guess you are right and I had already answered my own question, but the fact that the message was shown as an error was confusing me.
I do have git repositories in there, so I guess that the consistency between files that you mention is relevant and I should look into moving that stuff to a regular drive that VSS can work with. I guess however that VSS does not protect you against any possible inconsistency, right? For example, if the VSS snapshot is taken right in the middle of a modification to a database/repository, some files may be inconsistent regardless right? I understand that VSS reduces this “risk window”, since it spans until the VSS snapshot is taken, instead of for as long as the whole backup process is executed. Is this correct?
And yes, I agree with you this should probably be a warning. I think it would also help a lot if the warning message mentioned that a regular backup is carried out anyway when the VSS snapshot cannot be taken.
You are right. VSS only provides the foundation/functionality that software which writes files that need to be consistent can use to make sure that those files are consistent when they need to be consistent
Basically, restic is the Requestor, it can only ask that a snapshot is created, but then it is up to other software which are the Writers to act on that request and make sure that their files are consistent in that VSS snapshot.
I’m not aware that Git has a VSS writer, I doubt it, but generally speaking, unless you actually run some git command at the same time as you’re backing up the repository, nothing in it should change anyway.
Thanks a lot for the reference. I was missing the concept of Writers. So it seems like VSS needs to be supported by the applications to guarantee consistency within and between the files used by such application. Whether git supports it or not is something that I don’t know either, and I couldn’t find anything about it. Anyway, thank you for all the help!
Exactly. So if the only concern is that Git repository, and you don’t manage to use Git at the very same time as restic is backing up the files, there shouldn’t be room for inconsistency.
Some backups are performed automatically, so I guess there’s a chance for a change to the repo to eventually coincide with the backup process. They’re daily, so it shouldn’t be the end of the world if one is inconsistent though. Anyway, that’s too specific of my case. Thank you for all the help!