rsync Command Examples

Transfer files either to or from a remote host (but not between two remote hosts), by default using SSH. To specify a remote path, use user@host:path/to/file_or_directory. More information: https://download.samba.org/pub/rsync/rsync.1.

rsync {{path/to/source}} {{path/to/destination}}

rsync {{-a|--archive}} {{path/to/source}} {{path/to/destination}}

rsync {{-zvhP|--compress --verbose --human-readable --partial --progress}} {{path/to/source}} {{path/to/destination}}

rsync {{-r|--recursive}} {{path/to/source}} {{path/to/destination}}

rsync {{-r|--recursive}} {{path/to/source}}/ {{path/to/destination}}

rsync {{-auL|--archive --update --copy-links}} {{path/to/source}} {{path/to/destination}}

rsync {{-r|--recursive}} --delete rsync://{{host}}:{{path/to/source}} {{path/to/destination}}

rsync {{-e|--rsh}} 'ssh -p {{port}}' --info=progress2 {{host}}:{{path/to/source}} {{path/to/destination}}