Common rsync command options

Below is an example rsync command that I use. It copies the "child" directory from the local "parent" directory to the remote "parent" directory. Notice how on the destination, the "child" directory is not included:

rsync -chavzP --stats --delete-before /local_directory/parent/child someremoteserver:~/remote_directory/parent

The options mean:

c: skip based on MD5 checksum, not mod-time & size
h: human readable numbers
a: archive mode (It is a quick way of saying you want recursion and want to preserve almost everything)
v: verbose 
z: compress file data during the transfer
P: The -P option is equivalent to --partial --progress.  Its purpose is to make it much easier to specify these two options for a long transfer that may be interrupted.
--stats: Shows output on the terminal
--delete-before: deletes extraneous files on the destination before transferring new and/or updated files.

Internal References

External References

Article Type

General