Need help understanding retention and restore

Hi everyone. I’ve recently installed Duplicati to use a simple backup for my mother’s computer and I was VERY impressed with it. So much so I am considering replacing my jenky batch files -circa 1999- on my own machines.

I got my head around pretty much all I need, except one tiny detail I can’t seem to find answered: All backups are “incremental but full” sort of thing, I got that, but what I don’t understand is how does this interact with retention policy?

What I mean is let’s say I plan a retention period of 6 months; now let’s say I have a file in there which didn’t change since the very first backup. Unless I misunderstood, Duplicati doesn’t actually copy that file over and over in every backup: it just copies the hash it created as a “reference” to the initial backup where the file is stored (understandably simplified explanation). When restoring from the last backup, it fetches this “referenced” file in the initial archive where it was first encountered.

So with that in mind, once that initial backup gets deleted because it falls to the 6-month purge, how does Duplicati deal with this? Does it copy that file in the following backup because it sees it’s not there anymore, or will it try to find it in a now deleted archive and crap out?

I’m 100% sure there is a mechanism for this and option two won’t happen, but I just can’t find it (or more likely didn’t understand it when I did read it).

Thanks in advance wonderful people! :slight_smile:

Hello and welcome to the forum!

As you know, Duplicati uses deduplication so the same data block doesn’t get stored on the back end more than once. Duplicati keeps track of which backup versions are referencing which data blocks. So when your retention policy kicks in and Duplicati decides to prune an old backup version, the underlying data blocks are not deleted UNLESS those blocks are no longer referenced by any remaining backup versions.

In your scenario, the file that hasn’t changed for 6 months will still be recoverable. It will only be unrecoverable if you delete it (or exclude it from backups) and then let 6 months pass.

Does this make sense?

Makes complete sense! Thank you very much for confirming this!