I am hoping to achieve some cleanup functionality on about 20TB for my NAS with rsync in linux by excluding whole directories and contents for directories that would contain a ".protect" file
I generate really large caches in subfolders like
cache/simulation_v001/reallybigfiles_*.bgeo
cache/simulation_v002/reallybigfiles_*.bgeo
cache/simulation_v003/reallybigfiles_*.bgeo
and if a file existed like this- cache/simulation_v002/.protect
Then i'd like to build an rsync operation to move all folders to a temp /recycle location excluding cache/simulation_v002/ and all its contents.
I've done something like this before with python, but I'm curious to see if the operation can be simplified with rsync or another method.