Case A:
Rsync still has to start from the beginning, but it uses the partial file as a basis file, so transfer of the first part should be much faster than transferring from scratch. Rsync will NOT do what you are thinking and use the same file and just continue building on it, but it will start a new file, leaving the "partial" file there until the new one is completely rebuilt, after which the partial one is deleted.

Case B: 
Same issue really here... Re-encrypting will generate a new file with new mod timestamp. Again it will be uploaded using already present file as a basis, making the transfer much faster, but the whole file will be rebuilt on the destination (of course be using large chunks of the basis file, which is what will speed it up).

On Thu, Jul 30, 2009 at 11:33 PM, Jan Alphenaar <> wrote:

I was recently playing around with rsyncrypto and rsync and found some
interesting behavior during one of my large file transfers.

This is the situation. After encrypting my large file (approximately 1GB),
rsync starts copying this file to my server. Here is the rsync command used,
I modified it a bit to make it easier to read. Note, the "partial" option is
used. In case the transfer is interrupted, rsync leaves the partially
transferred file on the server.

rsync -rlt -v --partial -e ssh jan@<servername>:/data

Half way down I interrupt the transfer, the partially transferred file stays
on the server as expected. In the next session the file is again encrypted
with rsyncrypto. Then I start a new rsync copy of the file, expecting rsync
would continue with the partially transferred file, but it does not, it
starts over at the beginning. Lets call this case a.

It becomes even more fuzzy. Consider the following case (b). When I encrypt
a large file with rsyncrypto and fully transfer it to my server. After
transferring, I am going to encrypt my file again. Start a new transfer of
the newly encrypted file. Now rsync is not copying over the file, fully
making use of the rsync algorithm.

I know it looks like an rsync issue, but the rsync behavior is correct if
the file is not encrypted a second time. Then is does not start at the
beginning (but at the end) the second time it tries to copy a large file.

Can anybody explain this behaviour, cause I am totally in the dark with this

Any help is greatly appreciated.

Warm regards,


Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
Rsyncrypto-devel mailing list