Im trying to rsync all the .PHP and .HTML files from any directory inside of /home/ . However in /home/site2/public_html/cache_old/ there are .html files that i do not want to include in the sync (thus i want to exclude that directory and any of its sub-directories)
Here is the best rsync command i can come up with (after lots of testing and failures):
rsync -avv /home/ /ssd/rsyncPHPsFORmtree/ --include '*/' --include '*.html' --include '*.php' --exclude /site2/public_html/cache_old/* --exclude '*'
Im convinced that my rsync command is not formatted properly based upon this output from when rsync is running:
[sender] showing file site2/public_html/cache_old/total_pages/s/e/a/r/c/page99.html because of pattern *.html
[sender] showing file site2/public_html/cache_old/total_pages/s/e/a/r/c/Page4.html because of pattern *.html
[sender] showing file site2/public_html/cache_old/total_pages/s/e/a/r/c/searchHe107.html because of pattern *.html
[sender] showing file site2/public_html/cache_old/total_pages/s/e/a/r/c/page18.html because of pattern *.html
Thanks