I'm currently using rsync to backup my development drive. In it I have many projects with a
node_modules directory. This can happen recursively in any part of the tree. I'm trying to get rsync to exclude this dir completely no matter where it appears in the tree except that I'm only being able to exclude it in the top most branch.
I thought that by using a glob pattern in the exclude flag I would be able to achieve this but I'm not being able to.
EDIT: Here's the command I'm using:
rsync -avrt --no-whole-file --inplace --delete --exclude-from ~/backup_scripts/exclude_list . /Volumes/Backups
Library/Application Support/Spotify/PersistentCache/Storage/ Library/Application Support/Steam/appcache/httpcache/ Library/Application Support/Steam/config/htmlcache/ Library/Caches/ Library/Logs/ .bash_sessions/ .npm/ .composer/ .pdepend/ .cocoapods/ node_modules
node_modules/* to no avail.