As in the title, I can see a number of options for filters, but I can’t think of a way to make CACHEDIR.TAG work on my backups without actually running a script to generate new excludes and copying it in before the backup runs.
“Exclude directories whose names contain” or “Exclude files whose names contain” wouldn’t work, for example, but they’re only a step away from “Exclude directories containing files whose names contain” when seen together…
The regular expression options seem like the best match, though, if there’s a way to match against a full path, while reducing the result to something smaller. I don’t know if there is, but I can’t seem to find docs indicating that it’s possible. If I could simply set up some kind of search/replace thing for the filter rules, that would be great. For instance, if the regex options had two fields with the second one specifying the the actual filtered element from the match. This second field would default to the whole match, but you could use a string with a backreference to adjust the filter to what you needed. With this, I could use “(.*/)CACHEDIR.TAG” for the first field (the match) and “\1” for the other and have exactly what I needed.
Honestly, if there was just somewhere I could put a text file containing exclude filters, I could use run-script-before-required to generate that as needed, and then I could have essentially unlimited flexibility in generating filter rules on demand (though that would be best if Duplicati passed in or otherwise made available details about the backup’s other options, such as sources to consider). That seems like the most enticing idea to me if there isn’t any way to do this already, but I’m actually hoping that there’s already something that would let me accomplish this