Can we encrypt copied files on target machine?

Jose' Sebrosa sebrosa at
Thu Oct 11 05:27:35 EST 2001

The problem

I want to copy a file from machine A (master) to machine B (backup) but I would
like to stop root user on machine B to easily look at the file contents.  So I
encrypt the file to send at machine A and send just the encrypted version to
machine B (which has no means to decrypt the file).

Then I make a small change in the file in the machine A and want to send the
new version to machine B.  If I simply repeat the procedure (encrypt at A and
rsync with B) I lose the rsync advantages, since a local change in the raw file
leads to a global change in the encrypted file.

The solution?

Maybe I can split the raw file at A in several parts, encrypt them separately
and send them as separated files to B, along with info on how to rebuild the
file from the *decrypted* parts (remember, B doesn't know how to decrypt).  The
problem then would be to keep at A a record of the parts sent do B, in order to
decide how to split the file the next time A wants to send it to B (the
spliting is not trivial, since the parts must be equal to those already at B if

So eventually I finish using the rsync algorythm, not to do the final copy of
files from A to B, but to do the splitting of the raw file at A into parts.  I
just need to build an auxiliary file with info on how to join the parts,
instead of the parts already joined.

The questions

Can rsync do the spliting and build info on how to join instead of joining?
Does anyone have this kind of problem?
Has the problem an easier solution?
Am I missing something?


More information about the rsync mailing list