RSync - Download

Jakob Jenkov
Last update: 2014-05-23

RSync takes place between a client and a server, and occur in two directions: Upload and download.

During an upload, the client uploads a new version of the file to the server.

During download, the server holds the new version of the file, and the client the old version. The client then needs to download the new version of the file from the server. This situation could arise if a different client had uploaded the new version to the server.

In this text I will focus on download.

The Download Process

The diagram below shows the process involved in an RSync download. This diagram also shows some of the components in play internally on the client and the server. As you may notice, the components in play are now running on opposite computers as during an upload.

The diagram is scaled down. Click the diagram to get a larger version.

RSync: The download process.
RSync: The download process.

Here is a break down of the process:

  • Client calculates checksum of the old file, and sends file name + checksums to server.
  • Server detects differences between its (new) version and the checksums received from the client, and sends back merge instructions.
  • Client merges old file with differences received in the merge instructions.

Jakob Jenkov

Featured Videos

Java ForkJoinPool

P2P Networks Introduction


Java Persistence
Close TOC
All Tutorial Trails
All Trails
Table of contents (TOC) for this tutorial trail
Trail TOC
Table of contents (TOC) for this tutorial
Page TOC
Previous tutorial in this tutorial trail
Next tutorial in this tutorial trail