# Remote to Local
rsync -avzuhP username@yourserver.com:/path/to/destination/folder/or/file /path/to/local/folder
# Local to Remote
rsync -avzuhP /path/to/local/folder/or/file username@yourserver.com:/path/to/destination/folder
# Flags used:
# -a: Archive --> see http://serverfault.com/questions/141773/what-is-archive-mode-in-rsync for details
# -v: Verbose mode
# -z: Use compression
# -u: skip files that are newer on receiver
# -h: Human readable output
# -P: Show progress
# Add -n to perform a dry run
Snippet to rsync files/folders between two servers.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.