I am trying to setup Scheduled Windows Backup at x time daily.
Assuming windows backup takes few hours. What will happen if Duplicati starts before Windows Backup finishes. Or other way Windows Backup stars before Duplicati Finishes.
Both use VSS. So will they conflict/ fail.
Windows backup uses VSS Full Backup & VSS Copy Backup. Should any changes be made here.
I’m not positive but my guess is you’ll find either:
- Both run just fine together, just a little more slowly than if individually (more likely)
- One waits to “start” until the first has finished (less likely)
Either way, I don’t think you have to worry about either of them flat out failing.
My understanding is that each operation should create a unique VSS snapshot. I assume that the creation of snapshots is queued, but once they are created each backup should be able to run with its own snapshot.
I could not find an authoritative article on the subject, but this SO thread says it works:
I tried it out
It worked but noticed one thing two applications cannot create snapshots at the same time.
Duplicati gave a error ’ snapshot creation already in progress’ while I started windows backup and started Duplicati just after it.
Did Duplicati stop at that error (boo) or did it wait it’s turn and create a VSS snapshot as soon as it was able (yay)?
It stopped with the error
@kenkendk, would it be difficult to have
snapshot creation already in progress trigger a retry loop for X minutes rather than an abort?
If somebody only has weekly backups this feels like a pretty big potential hole…
--vss-snapshot-policy handles this kind of problems.
--vss-snapshotpolicy=auto will silently continue the backup,
- -vss-snapshotpolicy=on will also continue after writing a warning message to the log.
Waiting until all VSS providers are available could be tricky. If a VSS writer hangs, Duplicati will wait forever without backing up anything, until the VSS problem is solved or the computer is restarted.
It’s better to have a backup without using VSS that not having a backup at all.
What I’m not sure about is:
How does Duplicati behave in case VSS is busy and
vss-snapshot-policy is set to Auto or On?
Ideally, the backup should continue without creating a shadow copy. If the backup fails because VSS is available on the source system, but can’t be used temporarily (because another process is creating a VSS snapshot), I guess this should be fixed.
I have set it to required because I have locked opened files in sources
I see. But what should Duplicati do when VSS is unavailable? If the backup job waits until VSS is available, it could wait endlessly in case there is a problem with a VSS writer.
How long should it wait by default? The time it takes to create a VSS snapshot is quite unpredictible, because it relates to the number of changed files, CPU performance, storage subsystem performance etc.
In my backups I set
on. If creating a snapshot fails, a warning message is logged, but at least I will have a backup of all files that were not in use.
Can you provide some suggestions on what Duplicati should do in which circumstances? In the first place, it somehow has to find out if VSS fails because of another process that’s creating a snapshot (don’t know if this is possible). And what should it do in both situations? Should it behave different if
Not sure how this can be implemented in a reliable way.
IIRC, VSS has a timeout in the library that triggers if it waits too long. I think that is the error @saviodsouza gets.