Rsync is a great tool – incredibly powerful for synchronizing directories, copying over a network or over SSH, an awesome way to backup a mobile device back to a core network securely and other great functions. it works better than just about anything else developed before or since, but is a command line UI that is easy to forget if you don’t use it for a while and Windows is a challenge.
This isn’t meant to be a comprehensive guide, they’re are lots of those, but a quick summary of what I find useful.
There’s one confusing thing that I have to check often to be sure it is going to do what I think it should – the trailing slash on the source. It works like this:
A quick summary of useful command options (there are many, many) is:
-v, --verbose increase verbosity -r, --recursive recursive (go into subdirectories) -c, --checksum skip based on checksum, not mod-time & size (slow, but accurate) -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X) -z, --compress compress file data during the transfer, should help over slow links -n, --dry-run trial run, don't move anything -h, --human-readable display the output numbers in a human-readable format -u, --update don’t copy the files from source to destination if destination files are newer --progress show the sync progress during transfer --exclude ".*" exclude files starting with "." --remove-source-files after synced, empty the dir (like mv/merge) --delete any files in dest that aren't in source are deleted in destination (danger)
I do not recommend using compression (-z
) on a LAN, it’ll probably slow you down. Over a slower (typically) WAN link it helps, but YMMV depending on link and CPU speed.
If the files really have to be accurately transferred, the checksum (-c
) option is critical – every copy function should include this.






Leave a Reply
You must be logged in to post a comment.