Priority ordering of exclude and include files


Posted here as I thought it may be more suitable for discussion.

It would be useful for restic to consider the order of includes and excludes (given via parameters) so that one could override the other. For example, I have a “global” exclude file which excludes backing up .msi files. However, there is one backup job I want to include .msi files, but continue obeying the global exclude file. With the current restic behaviour there’s no way for me to “re-include” *.msi and still use the global excludes.

If restic obeyed the order of the --exclude-files and --files-from, I’d be able to use the latter to re-include the *.msi files.


I don’t think restic supports “–include” for backup command at all.
The issue is tracked here:


Thanks! I did a search on the issues but somehow didn’t find that one.