Last active
August 29, 2015 13:56
-
-
Save ashrithr/9256882 to your computer and use it in GitHub Desktop.
rsync using ssh protocol and exclude flag
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 -rav -e 'ssh -i /Users/ashrith/.ssh/aws.pem' --exclude=".git/*" ${SOURCE_PATH} root@${HOST}:${PATH} | |
# Copying to remote server with out root user: | |
# for this command to work make sure the 'Defaults requiretty' is commented on the remote server in '/etc/sudoers' file | |
rsync -rav -e 'ssh -i /root/to/key' --rsync-path="sudo rsync" /path/to/copy/* rsyncuser@${HOST}:/dest/path/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment