Size of Databases (are they holding old entries?)

I looked around the forum but found no answer to this. So please forgive me, if this was already adressed.
Basically i get one database (sqlite-file) per backup job i create.
This file will increase in size with every backup run duplictii makes, right?
Now i’m wondering - will this file size grow indefinitely or will old entries be deleted?
For instance: i got a job with daily runs and a setting for max. age of 3 months.
Will older entries than 3 months deleted from the database as well as the .dlist and .dfiles and so on?
Or will the database hold every entry for all eternity and grow indefinitely? :thinking:

I expect the database would continue to grow if old snapshots aren’t deleted.

None of the information in the backup specific database becomes stale. Duplicati wants to know about all the dlist files and all the volumes it has uploaded. It also needs to keep a list of all the files you have and which block it’s in.

The only time that data could shrink is if you clean up old snapsnots (e.g. retention policy) or if you purge files from all backup versions. That being said, I don’t know for sure that Duplicati automatically deletes that information.

1 Like

Pectorin is correct - when a version is deleted (such as “aging out” after 3 months) Duplicati flags the related local database records as “deletable”. Each time Duplicati runs it looks at what’s flagged as deletable and an entire dblock file’s worth of content is flagged, then it (and related) files will be deleted. Once the file deletes are verified, then the records will be removed from the database as well.

If a dblock only has SOME deletable items, then based on --small-file-size and --small-file-max-count settings, Duplicati will potentially download multiple dblock files and re-compress them into fewer files (without the deletable items) and re-upload them. Again, after confirmation of the re-upload, the related database records are deleted.

2 Likes

That answers my question perfectly!

Thank you both! :clap: