D
D
DarkByte20152018-09-13 17:05:19
linux
DarkByte2015, 2018-09-13 17:05:19

How to copy faster?

I copy many files from one server to another. I'm trying to understand how faster (periodically there is such a need). I just can't figure out how the rsync -a and -z options differ? According to the mana, the first archives, the second compresses ... Isn't it the same thing? Or does the first compress all files at once into one archive, and the second compresses each file separately? How faster?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergey, 2018-09-13
@DarkByte2015

It's all written.

-a, --archive
Equivalent to -rlptgoD. This is a quick way to indicate that you need recursion and want to keep almost everything.
Note, however, that -a does not preserve hard links, because finding multi-linked files is expensive. You will have to specify -H separately.

-z, --compress
With this option, rsync compresses all transferred file data. This is useful on slow lines. The compression method used is the same as that implemented by gzip.
Note that this usually achieves a better compression ratio than can be achieved using remote shell program compression or transport layer compression, as all information sent in the corresponding data blocks is involved in the compression process.

www.opennet.ru/man.shtml?category=1&russian=0&topi...

R
RidgeA, 2018-09-13
@RidgeA

options `a` and `z` are different things, and `man rsync` is quite clear what each of the options is responsible for.
tl;dr - option `z` is responsible for data compression

A
Andrej Gessel, 2018-09-13
@andiges

The -a option does not create an archive, but behaves as archive, that is, it saves all meta data to files (creation time, user, group, etc.).
Well, -z compresses all all data during transmission. The data transfer rate, as Vladimir
wrote , depends on the amount of data, whether the data is synchronized or a new copy is made, how much the copies differ from each other.

V
Vladimir, 2018-09-13
@MechanID

1 read man there each key is explained.
2 speed depends on many things - network speed, type of ssh encryption, etc.
3 many files is how much? thousand hundreds of thousands? millions? their average size? file type? (usually it makes no sense to compress videos or pictures)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question