$ rsync --zaP src/ dst
$ rsync --zaP -e 'ssh -p <port-number>' src/ dst
$ rsync --anv src/ dst
$ rsync --delete
$ rsync --exclude=pattern
$ rsync --exclude=p --include=p
$ rsync -a --delete --backup --backup-dir=/path/ src dst
$ rsync --exclude=".*" #all hidden files and folders
$ rsync --explude=".*/" #only hidden folders
Ref: https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories Ref: https://www.tecmint.com/sync-files-using-rsync-with-non-standard-ssh-port/ Ref: https://askubuntu.com/a/482920