rsync getting started code example
Example 1: rsync from remote to local
rsync -chavzP --stats [email protected]:/path/to/copy /path/to/local/storage
Example 2: rsync sync remote dir
rsync -a ~/dir1 username@remote_host:destination_directory
rsync -chavzP --stats [email protected]:/path/to/copy /path/to/local/storage
rsync -a ~/dir1 username@remote_host:destination_directory