Last active
April 29, 2019 21:02
-
-
Save rot26/21c1d43bf3230ab873c2fb42fce3ac67 to your computer and use it in GitHub Desktop.
[rsync as root example] #rsync #sudo #root #scp #ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#rysnc as root by using `--rsync-path` | |
SOURCE_DIR="host-in-config:/path/to/copy" | |
DEST_DIR="/path/to/destination" | |
rsync \ | |
--recursive \ | |
--update \ | |
--links | |
--rsync-path="sudo rsync" \ | |
-e ssh \ | |
--progress \ | |
"${SOURCE_DIR}" \ | |
"${DEST_DIR}" \ | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment