What can I say?! Rsync is awesome! The options I normally use for this is:
# rsync -aHAXEWPh source destination
The options above are explained below.
-a | --archive | Archive mode. Same as -rlptgoD . |
-H | --hard-links | Preserve hard links. |
-A | --acls | Preserve ACLs (implies -p ) |
-X | --xattrs | Preserves extended attributes |
-E | --executability | Preserves the executability of a file. |
-W | --whole-file | Copies whole files without delta operations. |
-P | --progress | Indicate progress with output. |
-h | --human-readable | Output numbers are in a more readable format. |
See the man
pages for more information
$ man rsync
I also like to use the --dry-run
option too the first time I run it just to make sure its actually copying what I think it is. For example, you might run this.
root@repo:~# rsync -aHAXEWPh /srv/repositories-remote/ /srv/repositories-local/ --dry-run
Nothing will actually get copied with the dry-run option enabled so you’ll need to remove that when you’re sure about what you’re copying.
Be the first to comment