Restore touches original files?

For testing I restored a backup to a different location and got two warnings:

2019-10-22 18:02:41 +02 - [Warning-Duplicati.Library.Main.Operation.RestoreHandler-PatchingFileLocalFailed]: Failed to patch file: “C:\Users\NOBODY\Desktop\ffffffff\systems\chris.Kno” with data from local file “C:\SuperMemo\systems\chris.Kno”, message: The process cannot access the file ‘C:\SuperMemo\systems\chris.Kno’ because it is being used by another process.

(The message is correct - I have a process running that locks the file)

My guess is that duplicati reads the file, compares it with the backup and restores from the local drive if they are identical? If so, is there a way to disable that behavior?

Good guess. I think identicality is found by a hash of the local block. The desired hash is already known.

–no-local-blocks should avoid the issue, and is also wise when testing restore from backup really works.

–no-local-blocks = false`
Duplicati will attempt to use data from source files to minimize the amount of downloaded data. Use this option to skip this optimization and only use remote data.

I think you can get in trouble on the original system too, if you use –snapshot-policy (e.g. Windows VSS) to get around locks. The restore won’t use VSS, and so may hit some locked file issues. There’s at least an enhancement (if not a bug fix) there, but I’m not sure if anyone has ever filed an issue into the queue.

Thank you, that was it. I set --no-local-blocks and the restore worked without warning while the process that locked the files was running…