Does not restore all marked files when all-versions is on

Duplicati - 2.0.4.38_canary_2019-12-29

Settings:
• Backup retention: on
• Advanced options. all-versions: on
Bug:

  1. Backup folder with 1 file.
  2. Delete that file.
  3. Copy any other file to the same folder.
  4. Backup the same folder again.
  5. Delete the second file.
  6. When you try to restore 2 of these files at once, only the last one is restored, although both are marked for recovery.

“[Warning-Duplicati.Library.Main.Operation.RestoreHandler-MetadataWriteFailed]: Failed to apply metadata to file: “E:\aa”, message: The process cannot access the file ‘E:\aa’ because it is being used by another process.”

How are you doing that? In your scenario it seems that file A exists in one backup snapshot and file B exists in a separate one. Duplicati requires you to pick a backup snapshot and then pick from the files contained within - you cannot submit a backup job that lets you pick files from different backup snapshots.

If you have E:\aa folder open in Explorer or elsewhere, it can cause this error message. From what I’ve seen it means only the metadata on that folder wasn’t restored. Actual data should have been restored though.

Yes, each file is obtained in a separate snapshot. But then this setting and the possibility of selecting all the files from all previous snapshots at once is misleading.


Interesting, thanks for the clarification. I’ve never tested that scenario. I’ll give it a try when I get some time.

A Google search for “all-versions” at site:duplicati.readthedocs.io supports my hunch, which is that “search” means the FIND command, which is how one searches. You can try that at Commandline.

“Use this option to show all previous versions too” text suggests a find, which is also called list.

The RESTORE command also has a syntax which seems to say multi-version restore isn’t allowed:

--version=<int>
Restore files from a specific backup.

https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Main/Operation/ListFilesHandler.cs
looks like the only place AllVersions is used, so I don’t think it affects Restore, however I’m less sure whether Restore from command line can be persuaded to do multiple versions using a –version list… Such a request could be problematic. Which version wins if a file is in several (unlike in original post)?

https://duplicati.readthedocs.io/en/latest/04-using-duplicati-from-the-command-line/
shows commands where --version is specifically said to do multiple versions. Restore is the opposite, which means my guess is that you won’t be able to persuade it otherwise. You could certainly test it…

mmh… I never try a multiple-version restore and I don’t know if it’s possible too but when one try to restore a file duplicati ask what it should do in case exist a file whit same name yet: overwrite file or add a timestamp in the name…

I use duplicati so far only through the web interface. The function to recover all files from different snapshots at the same time does not seem to work. So this is a bug. Hope to fix it.