Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Dropbox synchronization work?

I want to know how dropBox is able to synchronize the large data files without replacing or re-uploading the files again to the dropbox server

Example: an encrypted zip archive

Suppose I've a 1GB encrypted zip archive file Fully synchronized on my computer and on the dropbox servers,

On my computer I added to that zip archive file a file of size about 5MB then saved the file on my computer,

dropbox is able to synchronize zip archive file without re-uploading the whole file again instead it just update it with the small change I've done.

Also TrueCrypt containers works in that manner

Any keywords, ideas, topics, reviews, links, code is greatly appreciated.

like image 481
Michael Emad Avatar asked Aug 15 '11 00:08

Michael Emad


1 Answers

Dropbox uses the rsync algorithm to generate delta files with the difference from file A1 to file A2. Only the delta(usually much smaller than A2) is uploaded to the dropbox servers since dropbox already has file A1. The delta file can then be applied to file A1, turning it into file A2.

You can learn more about the algorithm here. http://en.wikipedia.org/wiki/Rdiff-backup#Variations

The source code for the library behind the delta creation can be found here. http://librsync.sourceforge.net/

like image 149
G Chris DCosta Avatar answered Sep 29 '22 23:09

G Chris DCosta