I like taking backup of my source folder.
There are a lot of files in that folder that I do not want to backup, though.
What files I do not want to backup happens to be quite well defined in the ‘.gitignore’ file for each repository inside the source folder.
So what I want is a filter that can detect the ‘.gitignore’-file and filer sub folders and files based on that.
But adding this rather special case to the core of duplicati might be a little ‘out of scope’, so maybe it instead should be possible to add such functionality through some kind of add on system?
The ‘default’-filters might also be suitable for an add on instead of core functionality as well?
I’ve also seen other kind of ‘marker’-files mentioned in discussions - like a ‘.doNotbackupThisFolder’-file.
What do you all think?
I think it might make sense to combine the two ideas such that if the file is empty it indicates exclusion of the entire folder, otherwise the file contents are assumed to be specific files to be ignored…or something like that.
I don’t know if file contents should be absolute, relative, wildcards, etc.
For the .gitignore part of the idea, the content is already defined. Cannot redefine the format there. And i was thinking of letting Git be the one to tell what spesific and folders will be ignored based on that content.
And that’s also why I suggest making such functionality pluggable - to avoid putting git dependencies into Duplicati itself.
It would also require a ‘stack’ of filters, so that filters can be added to the stack when entering a folder, and then be popped when the folder is exited. I’m not sure how well that fits with the current design.
How would you imaging things working if multiple content filters existed?
Since it’s all exclusion at this level there wouldn’t be conflicts so I’d think “stacking” makes sense.