A maneira como o algoritmo rsync
funciona pode ser encontrada em aqui .
The algorithm identifies parts of the source file which are identical to some part of the destination file, and only sends those parts which cannot be matched in this way. Effectively, the algorithm computes a set of differences without having both files on the same machine. The algorithm works best when the files are similar, but will also function correctly and reasonably efficiently when the files are quite different.
Portanto, não faria diferença se você está fazendo o upload ou o download, pois o algoritmo funciona em somas de verificação dos arquivos de origem e de destino. Portanto, qualquer arquivo pode ser a origem / destino.
Eu encontrei algumas informações mais úteis de aqui . Alguns dos trechos são,
RSync is a remote file (or data) synchronization protocol. It allows you to synchronize files between two computers. By synchronize, I mean make sure that both copies of the file is the same. If there are any differences, RSync detects these differences, and sends across the differences, so the client or server can update their copy of the file, to make the copies the same.
RSync is capable of synchronizing files without sending the whole file across the network. In the implementation I've done, only data corresponding to about 2% of the total file size is exchanged, in addition to any new data in the file, of course. New data has to be sent across the wire, byte for byte.
Because of the way RSync works, it can also be used as an incremental download / upload protocol, allowing you to upload or download a file over many sessions. If the current upload or download fails, you can just resume it later.