Command
rsync -av -e ssh --exclude={'*.pdf','*.log','*.json','*.jpeg','node_modules'} Source-User@SourceHost:SourceFolder DestinationFolder
Example
rsync -av -e ssh --exclude={'*.pdf','*.log','*.json','*.jpeg','node_modules'} jing@HOST-A:~/A-folder/ .
Where,
-a: Recurse into directories
-v: Verbose output
-e: Use ssh for remote shell so everything gets encrypted
--exclude: exclude files matching PATTERN
Reference
https://linuxize.com/post/how-to-exclude-files-and-directories-with-rsync/