I need to copy large files over the network, but I am not sure about the command line to use for it. I have been using rsync, but I feel maybe I could zip the files first?
How to copy large files over the network
rsync
rsync
I need to copy large files over the network, but I am not sure about the command line to use for it. I have been using rsync, but I feel maybe I could zip the files first?
Best Answer
rsync
already provides compression when you specify option-z
. You should avoid applying this option for already compressed files or binaries as it will just introduce additional overhead.When using rsync with the ssh protocol (the default) and you have only limited CPU resources and security is not an issue, you can also try specifying
-e ssh -c arcfour
to use a less expensive encryption algorithm (RC4). On modern CPUs this won't make any big difference, though.Other interesting arguments you may want to use:
-vP
for a nice progress bar and keep partially transfered files when interrupted, so you can resume from the partial file the next time you runrsync
-a
to preserve most (but not all!) file meta data such as permissions and modification times