so I’m running restic backup with some
--exclude parameters and have noticed some strange behaviour as follows.
Say I am running
restic backup /home/test/Documents/a/b/c --exclude=/home/**/Documents
/home/test/Documents/a/b/c contains some subfolders which contain various files, then the result will be that the snapshot will contain the directory structure up to
/home/test/Documents/a/b but nothing more.
I understand that in this case the interaction between the folder which is specified to be backed up and the exclusion is somewhat contradictory, but I would not expect the snapshot to contain what it contains. It think that either of the two, the folder to be backed up, or the exclusion should take precedence. I think it would make most sense to let the folder to be backed up take precedence and let the exclusion in this case only apply to folders under the specified folder to be backed up (i.e. no folder named
Documents anywhere in the hierarchy beneath
/home/test/Documents/a/b/c should be included.
What do you guys think?