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
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.