rsync -azP -e 'ssh -i /path/to/id_rsa_private_key' /files/source [email protected]:/destination/path
Be sure to add ssh-add /path/to/id_rsa_private_key
-a
It stands for "archive" and syncs recursively and preserves symbolic links, special and device files, modification times, group, owner, and permissions.-z
reduces the network transfer by adding compression-P
It combines the flags --progress and --partial. The first of these gives you a progress bar for the transfers and the second allows you to resume interrupted transfers-e
command to execute