Skip to content

Instantly share code, notes, and snippets.

@aginanjar
Created December 18, 2018 03:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Example of rsync (file copying tool)

Server to Local

$ rsync -avz -e --progress "/usr/bin/ssh -i /Users/local/if-any.pem" user@your-remote-server:/home/server/path/your-file.txt /Users/local/path/

or without *.pem

rsync -avz --progress user@your-remote-server:/var/www/ /Users/local/file.extension

Local to Server

$ rsync -avz -e --progress "/usr/bin/ssh -i /Users/local/if-any.pem" /Users/local/path/your-file.txt user@your-remote-server:/home/server/path/

or without *.pem

rsync -avz --progress /Users/local/file.extension root@your-remote-server:/var/www/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment