Deleting files when restoring older version

I’m currently looking for a way to have some kind of backup- and versioning-system and I do have to say that I really like how simple and straightforward Duplicati is.

I only have one issue when trying to restore an older version: It does not delete files which were added afterwards. Basically what I would need is an exact copy of the selected version without any extra files.

Is there a config option or setting I might have overlooked or is this simply not possible as of now?
If that is the case, what would be the best way to achieve this? Checking the entire directory tree manually isn’t really an option…

I guess renaming or deleting the source folder(s) before you start the restore operation is the easiest option.

It’s quite tricky to let a backup program delete source files that were never backed up (which is the case if you restore from the most recent version).

It sounds like you’re looking for something similar to what’s described in this topic:

Duplicati doesn’t delete anything during a restore as it’s too easy to type a wrong path or forget you’ve got an important not-yet-backud-up file in the restore location which could cause you to lose data.

So while Duplicati can restore specific versions of individual files that it has backed up, it doesn’t restore “snapshots” of what a folder looked like at the time of the backup (meaning it won’t delete newer files that didn’t exist at the time of he backup).

As @kees-z mentioned, you could delete the source folder yourself before doing a restore or consider restoring to a different folder then using a compare tool such as BeyondCompare, K-Diff, WinDiff, Krusader, etc. to manually get rid of the “newer” files you don’t want.

Note that if you think a “forward looking” restore might be a useful feature you could consider adding an issue over at Issues · duplicati/duplicati · GitHub describing how you think it could work.

For example, a “–forward-looking-restore” type flag could indeed look at files created AFTER the version being restored and safely delete them IF they exist in future backup sets. But this still wouldn’t handle files (or changes) that had not been backed up yet. Plus, depending on retention-policy settings it’s possible the “future-version” being held in the Duplicati backups could get pruned out AFTER doing the “past-version” restore - so scenarios like that should be considered and explained in documentation.