Skip to content

Instantly share code, notes, and snippets.

@fduran
Created April 29, 2014 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save fduran/11400761 to your computer and use it in GitHub Desktop.
Save fduran/11400761 to your computer and use it in GitHub Desktop.
# www.fduran.com
# sync (copy) local to remote server directory
# take out dry-run after test
rsync --dry-run -azvrh -e 'ssh -p 2022' --exclude 'donotcopy' /var/www/ user@10.0.0.1:/var/www/
# options:
a: archive, preserve metadata
z: compression
v: verbose
r: recursive
h: human
--progress
--delete : delete files at destination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment