rsync command line examples

Excluding Paths

The first will skip items with pattern, the second for paths rooted at /pattern and the last for files under pattern/.

rsync -av --exclude='pattern' user@host:/path/to/source/ ./path/to/target
rsync -av --exclude='/pattern' user@host:/path/to/source/ ./path/to/target
rsync -av --exclude='pattern/*' user@host:/path/to/source/ ./path/to/target

Rsync with alternate ssh port

rsync -e 'ssh -p 8496' -avz user@host:/path/to/source/ ./path/to/target