Created
July 5, 2018 17:07
-
-
Save etiennepouliot/da09c91fd536c37a021676829fd2905d to your computer and use it in GitHub Desktop.
rsync with sudo
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
#in /etc/sudoers.d, create a file that contains | |
Defaults:myuser !requiretty | |
mysuser ALL= NOPASSWD:/usr/bin/rsync |
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
rsync -av -e "ssh" --rsync-path="sudo rsync" /path/* remoteserver:/path/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment