How to backup files older than X days


Hello, I thought an interesting use case. I want to backup only files that are older than 14 days.
So Duplicati will ignore (filter out) files files younger than 14 days and backup only older files.

Is there any way to do it in Duplicati?

I cant find any date related filter, so the only thing I can think of is external script to set attributes to files and use “exclude-files-attributes” in Duplicati
But we already have “skip-files-larger-than” so maybe “skip-files-younger-than” should exist too? :slight_smile:

Thanks for the ideas.


I like the idea - especially as it could be a good way to avoid backing up temp or in-use files since they’re usually pretty fresh. :slight_smile:

One problem scenario I see is this:

  1. file is created thus younger than skip limit and not backed up
  2. file eventually gets old enough to be backed up and is
  3. file is updated making it younger than skip limit and not only is it not backed up, but the it’s flagged in the backup run as if it had been deleted
  4. file eventually gets old enough to be backed up and is

So the major tripping points off the top of my head include:

  • depending on retention policies you could lose a lot of your backup coverage
  • if you go to restore files and happen to select a backup that occurred between 3 and 4 above then you wont get ANY version of the file in question restored (because Duplicati saw it was deleted).

I think this could be avoided if instead of excluding a file because it was too young instead flagged it as “unchanged”, but that brings about it’s own potential (likely less damaging) set of situations to ponder. :thinking: