Skip to content

Instantly share code, notes, and snippets.

@lslucas
Last active December 29, 2016 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lslucas/3103fd7447a58ddd12d9 to your computer and use it in GitHub Desktop.
Save lslucas/3103fd7447a58ddd12d9 to your computer and use it in GitHub Desktop.
rsync - clone folder from one server to another

On origin server

ssh-keygen -f ~/.ssh/id_rsa -q -P ""
cat ~/.ssh/id_rsa.pub

Copy and put that ssh key on destination server in (if don't exists, create it): ~/.ssh/authorized_keys

Now, rsync

rsync -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress /var/www/claro/public/ root@107.170.127.55:/var/www/host/claro/public

source: https://www.digitalocean.com/community/tutorials/how-to-copy-files-with-rsync-over-ssh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment