Rsync grande - empurre ou puxe?

2

Estou prestes a iniciar um grande rsync entre dois servidores na minha LAN. É melhor para mim empurrar os arquivos de um servidor para o outro ou puxar eles (para trás)?

Não há nada que faça um funcionar, e o outro não funcione - estou apenas imaginando se existe uma razão (talvez velocidade) para fazer um sobre o outro.

Alguém pode me dar uma boa razão, ou não há razão para fazer uma sobre a outra?

    
por Questionmark 31.07.2014 / 22:51

3 respostas

8

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.

    
por 31.07.2014 / 22:59
2

O programa rsync na verdade executa uma cópia de si mesmo no servidor remoto. Depois que rsync estiver sendo executado nas duas extremidades, eles negociam entre si como melhor transferir os arquivos solicitados. Eu não acho que importa qual é o primeiro a ser iniciado.

No entanto, normalmente inicio a transferência da máquina mais próxima de mim. Dessa forma, se algo der errado, é mais provável que eu consiga monitorar o progresso da transferência de arquivos. Se ambas as máquinas estiverem na mesma LAN, esse motivo não seria um motivo para escolher uma sobre a outra.

    
por 31.07.2014 / 23:08
1

O método push ou pull pode ser significativo se a transferência usar uma linha ADSL porque as taxas de bits são diferentes quando você faz o download ou quando faz o upload. Nesse caso, a escolha depende da localização da máquina de destino.

    
por 03.09.2017 / 19:37

Tags