Say you need to sync a large number of file between two servers.
Here's the scenario:
The data to be transferred consists of a thousand directories containing up to 10k files each, and those files are mostly around 10kbytes.
Overall the data is around 400GB.
Because the data is not that large, one might think that it's a straight forward transfer, but because the data is made up of hundreds of thousands files there will be a lot of file stat'ing. This results in a rather lengthy transfer even if the data transfer speed is ignored.
So, when transferring this data from A to B, where initially all the data resides in A and none in B
What would be the best approach:
Pulling, within A:
rsync -a --delete /data/ B:/data/
pushing, within B:
rsync -a --delete A:/data/ /data/