In order to backup dir1/dir2/dir3/dir4/ recursively, but not anything else under dir1-3, it appears I have to use a filter like:
+dir1/dir2/dir3/dir4/*
+dir1/dir2/dir3/
+dir1/dir2/
+dir1/
If I’m understanding this correctly, every upper-level dir has to be explicitly mentioned, except if they match a wildcard. (Is there a reason the filter logic doesn’t auto-include the parent dirs? I can’t think of any scenario where you’d want to include a sub-dir but not the parent dir.)
Before I go making my rather painfully large filter file I wanted to ask, am I missing any potentially more manageable way to tackle the scenario where I have a pretty large FS hierarchy and want to backup only specific folders therein? I know of the symlink option but I don’t think it works well here.