Skip to content

Instantly share code, notes, and snippets.

@niraj-shah
Last active August 29, 2015 14:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niraj-shah/b3e92ac86038605bb24f to your computer and use it in GitHub Desktop.
Save niraj-shah/b3e92ac86038605bb24f to your computer and use it in GitHub Desktop.
Rsync from remote server to local
# remote to local
sudo rsync -uvzr -e 'ssh -p 2222 -l username' domain.com:/var/www/html/ /var/www/html
# local to remote
sudo rsync -uvzr /var/www/html/ -e 'ssh -p 2222 -l username' domain.com:/var/www/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment