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.
|Archive mode. Same as |
|Preserve hard links.|
|Preserve ACLs (implies |
|Preserves extended attributes|
|Preserves the executability of a file.|
|Copies whole files without delta operations.|
|Indicate progress with output.|
|Output numbers are in a more readable format.|
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.