Yes.
To simulate the missing files, test behavior with truly different files, and go beyond, I tested the following:
I set up a test based on a text file I had laying around that was large enough to have two default 100 KB blocks. I renamed it with .jpg to keep Duplicati from compressing, and added intended plan to file name:
to_lose
no_edit
to_edit which in this case edited the start of the last line, and added one more partial line after past end.
I added a new file to folder to verify Restore would leave it alone. Beyond that, I thought Restore would make the folder what it was at time of backup, and would not overwrite my edited file but make another.
Result of a dir
command (plus dragging files into notepad to inspect) confirms that that was what it did:
05/17/2019 06:30 PM 262,144 length262144.txt.no_edit.jpg
05/17/2019 06:30 PM 262,144 length262144.txt.to_edit.2020-02-10.jpg
02/10/2020 11:29 AM 262,150 length262144.txt.to_edit.jpg
05/17/2019 06:30 PM 262,144 length262144.txt.to_lose.jpg
02/10/2020 11:30 AM 0 New Text Document.txt
Looking at a –log-file at –log-file-log-level=verbose one can see the decision-making needed to get the lost file back, revert the edited one, and leave the unedited one alone. Patches with local data don’t log:
2020-02-10 11:31:21 -05 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Restore has started
2020-02-10 11:31:22 -05 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started: ()
2020-02-10 11:31:22 -05 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed: (3 bytes)
2020-02-10 11:31:22 -05 - [Information-Duplicati.Library.Main.Database.LocalRestoreDatabase-SearchingBackup]: Searching backup 0 (2/10/2020 4:26:31 PM) ...
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Database.LocalRestoreDatabase-RestoreTargetFileCount]: Needs to restore 3 files (768.00 KB)
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Database.LocalRestoreDatabase-RestoreSourceSize]: Restore list contains 13 blocks with a total size of 768.54 KB
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-TargetExistsInCorrectVersion]: Target file exists and is correct version: C:\tmp\patch test\length262144.txt.no_edit.jpg
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-TargetFileRetargeted]: Target file exists and will be restored to: C:\tmp\patch test\length262144.txt.to_edit.2020-02-10.jpg
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-MissingTargetFile]: Target file does not exist: C:\tmp\patch test\length262144.txt.to_lose.jpg
2020-02-10 11:31:22 -05 - [Information-Duplicati.Library.Main.Operation.RestoreHandler-RemoteFileCount]: 1 remote files are required to restore
2020-02-10 11:31:22 -05 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-b0987b42501bd4497b487b3449e6d08fd.dblock.zip (157.37 KB)
2020-02-10 11:31:22 -05 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-b0987b42501bd4497b487b3449e6d08fd.dblock.zip (157.37 KB)
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-PatchingFile]: Patching file with remote data: C:\tmp\patch test\length262144.txt.to_edit.2020-02-10.jpg
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-PatchingFile]: Patching file with remote data: C:\tmp\patch test\length262144.txt.to_lose.jpg
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-RecordingMetadata]: Recording metadata from remote data: C:\tmp\patch test\
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-RecordingMetadata]: Recording metadata from remote data: C:\tmp\patch test\length262144.txt.no_edit.jpg
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-RecordingMetadata]: Recording metadata from remote data: C:\tmp\patch test\length262144.txt.to_edit.2020-02-10.jpg
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-RecordingMetadata]: Recording metadata from remote data: C:\tmp\patch test\length262144.txt.to_lose.jpg
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-PatchingMetadata]: Patching metadata with remote data: C:\tmp\patch test\
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-PatchingMetadata]: Patching metadata with remote data: C:\tmp\patch test\length262144.txt.no_edit.jpg
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-PatchingMetadata]: Patching metadata with remote data: C:\tmp\patch test\length262144.txt.to_edit.2020-02-10.jpg
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-PatchingMetadata]: Patching metadata with remote data: C:\tmp\patch test\length262144.txt.to_lose.jpg
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-TestFileIntegrity]: Testing restored file integrity: C:\tmp\patch test\length262144.txt.to_edit.2020-02-10.jpg
2020-02-10 11:31:22 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-TestFileIntegrity]: Testing restored file integrity: C:\tmp\patch test\length262144.txt.to_lose.jpg
Restore to a different location has a similar log except with a local data remark and more verification because there had been 3 files restored without the one not having to be restored due to no change:
2020-02-10 11:54:06 -05 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Restore has started
2020-02-10 11:54:06 -05 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Started: ()
2020-02-10 11:54:06 -05 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: List - Completed: (3 bytes)
2020-02-10 11:54:06 -05 - [Information-Duplicati.Library.Main.Database.LocalRestoreDatabase-SearchingBackup]: Searching backup 0 (2/10/2020 4:26:31 PM) ...
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Database.LocalRestoreDatabase-RestoreTargetFileCount]: Needs to restore 3 files (768.00 KB)
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-MappingRestorePath]: Mapping restore path prefix to "C:\tmp\patch test\" to "C:\restore here\patch test\"
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Database.LocalRestoreDatabase-RestoreSourceSize]: Restore list contains 13 blocks with a total size of 768.54 KB
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-MissingTargetFile]: Target file does not exist: C:\restore here\patch test\length262144.txt.no_edit.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-MissingTargetFile]: Target file does not exist: C:\restore here\patch test\length262144.txt.to_edit.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-MissingTargetFile]: Target file does not exist: C:\restore here\patch test\length262144.txt.to_lose.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-FilePatchedWithLocal]: Target file is patched with some local data: C:\restore here\patch test\length262144.txt.no_edit.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-FilePatchedWithLocal]: Target file is patched with some local data: C:\restore here\patch test\length262144.txt.to_edit.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-LocalSourceMissing]: Local source file not found: C:\tmp\patch test\length262144.txt.to_lose.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-FilePatchedWithLocal]: Target file is not patched any local data: C:\restore here\patch test\length262144.txt.to_lose.jpg
2020-02-10 11:54:06 -05 - [Information-Duplicati.Library.Main.Operation.RestoreHandler-RemoteFileCount]: 1 remote files are required to restore
2020-02-10 11:54:06 -05 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Started: duplicati-b0987b42501bd4497b487b3449e6d08fd.dblock.zip (157.37 KB)
2020-02-10 11:54:06 -05 - [Information-Duplicati.Library.Main.BasicResults-BackendEvent]: Backend event: Get - Completed: duplicati-b0987b42501bd4497b487b3449e6d08fd.dblock.zip (157.37 KB)
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-PatchingFile]: Patching file with remote data: C:\restore here\patch test\length262144.txt.to_edit.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-PatchingFile]: Patching file with remote data: C:\restore here\patch test\length262144.txt.to_lose.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-RecordingMetadata]: Recording metadata from remote data: C:\restore here\patch test\
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-RecordingMetadata]: Recording metadata from remote data: C:\restore here\patch test\length262144.txt.no_edit.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-RecordingMetadata]: Recording metadata from remote data: C:\restore here\patch test\length262144.txt.to_edit.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-RecordingMetadata]: Recording metadata from remote data: C:\restore here\patch test\length262144.txt.to_lose.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-PatchingMetadata]: Patching metadata with remote data: C:\restore here\patch test\
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-PatchingMetadata]: Patching metadata with remote data: C:\restore here\patch test\length262144.txt.no_edit.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-PatchingMetadata]: Patching metadata with remote data: C:\restore here\patch test\length262144.txt.to_edit.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-PatchingMetadata]: Patching metadata with remote data: C:\restore here\patch test\length262144.txt.to_lose.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-TestFileIntegrity]: Testing restored file integrity: C:\restore here\patch test\length262144.txt.no_edit.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-TestFileIntegrity]: Testing restored file integrity: C:\restore here\patch test\length262144.txt.to_edit.jpg
2020-02-10 11:54:06 -05 - [Verbose-Duplicati.Library.Main.Operation.RestoreHandler-TestFileIntegrity]: Testing restored file integrity: C:\restore here\patch test\length262144.txt.to_lose.jpg