rsync

rsync has a lot of options I tend to forget.
Here a command that works

rsync --verbose --progress --stats --times --rsh="/usr/bin/ssh -c arcfour" --recursive --bwlimit=40000 <origin> <destination>

<origin> is the path to one or several files/directory. You can use wildcard characters

<destination> is the path to one direcotry or file (if you want to change file name)

Either  <origin> or <destination> can be on a remote location. It this case should look like user@server.example.com:/path/to/destination

--rsh="/usr/bin/ssh -c arcfour" Transmits over ssh using a very fast cypher (arcfour) to reduce CPU usage at both ends (sometimes CPU is the bottleneck!)
--bwlimit=40000 Limit I/O bandwidth; KBytes per second. Limits bandwith at 40MB/s (link LIMM -> UNI approx 100MB/s) to avoid saturation of the link.
--times preserve modification times. rsync, by default, checks file size and modification times to decide if a file was changed. If modification time differs, performs a checksum of both files. This might be slower than the transfer itself! To always force checksum use -c, to only compare file size use --size-only. Be careful with this last option.
--perms keep file permissions. Destination files will be set with same permissions as origin.
--recursive recurse into directories.
--progress and --stats give you something to look at if bored (and want to monitor the connection) and a final report to be impressed by 😉

Leave a Reply

Your email address will not be published. Required fields are marked *