good explain at Digital Ocean
https://www.digitalocean.com/community/articles/how-to-use-rsync-to-sync-local-and-remote-directories-on-a-vps
rsync -a dir1/ dir2
This is necessary to mean “the contents of dir1”. sync into dir2
This, mean the whole dir1 copied into dir2
rsync -a dir1 dir2
if accessing a different port, and exclude filetypes (note double dash for exclude):
[bash]
rsync -e ’ssh -p 2222’ -avz – -exclude ’*.mp4’ user@myserver.com:/home/source /destination
[/bash]
NOTE:
Its strange that the exclude option does not take absolute paths