Last Updated: February 25, 2016
·
781
· qc

rsync with remote sudo privileges

This makes it easy to copy a file(s) to anywhere on a remote server. If the source file ownership matches a user on the remote server its ownership will be retained.

rsync -a --rsync-path='sudo rsync' /local/path/ user@host:/remote/path/