Skip to content

Instantly share code, notes, and snippets.

@julienma
Created April 4, 2016 22:45
Show Gist options
  • Save julienma/131e997f5f2a8e242920057da28bca8d to your computer and use it in GitHub Desktop.
Save julienma/131e997f5f2a8e242920057da28bca8d to your computer and use it in GitHub Desktop.
rsync big folders from one server to another, with custom port and RSA key.
rsync -e 'ssh -p 12345 -i ~/.ssh/id_custom_rsa' --stats --progress -vaz ~/local-folder julien@host.com:~/remote-folder
@julienma
Copy link
Author

Alternative: to send a lot of small files over a slow connection, might be better to tar everything:

tar czf - <files> | ssh user@host "cd /wherever; tar xvzf -"

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