Skip to content

Instantly share code, notes, and snippets.

@etiennepouliot
Created July 5, 2018 17:07
Show Gist options
  • Save etiennepouliot/da09c91fd536c37a021676829fd2905d to your computer and use it in GitHub Desktop.
Save etiennepouliot/da09c91fd536c37a021676829fd2905d to your computer and use it in GitHub Desktop.
rsync with sudo
#in /etc/sudoers.d, create a file that contains
Defaults:myuser !requiretty
mysuser ALL= NOPASSWD:/usr/bin/rsync
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