Rsync with multiple wildcards

55 views Asked by At

How can I rsync all files of multiple types from a remote server? E.g. I want to rsync all pdf's and png's from a folder on the server.

This raises a syntax error: rsync REMOTE_SERVER:REMOTE_PATH/{*.pdf, *.png} LOCAL_PATH

I've also tried: rsync --include='*.png' --include='*.pdf' --exclude='*' REMOTE_SERVER:REMOTE_PATH/ LOCAL_PATH which syncs nothing.

I'm currently resorting to rsync REMOTE_SERVER:REMOTE_PATH/*.pdf LOCAL_PATH; rsync REMOTE_SERVER:REMOTE_PATH/*.png LOCAL_PATH but would like to do this in one command.

0

There are 0 answers