Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dropbox differential/incremental uploads using REST API

We know that Dropbox desktop clients use a binary diff algorithm to break down all files into blocks, and only upload blocks that it doesn't already have in the cloud (https://serverfault.com/questions/52861/how-does-dropbox-version-upload-large-files).

Nevertheless, the Dropbox API, as far as I see, can only upload the whole file (/files_put, /files (POST)) when a sync is needed.

Is there any way to do differential/incremental syncing using the Dropbox API, i.e. upload only the changed portion of the file like the desktop clients do?

If this is not possible, then what are the best practices to periodically sync large files that has small changes using the Dropbox API?

like image 746
Imre Kelényi Avatar asked Oct 06 '12 08:10

Imre Kelényi


1 Answers

Unfortunately this isn't possible and I would suspect that it may never be available.

After doing a bit of research, I found a feature request for delta-syncing to be integrated into the API[*]. Dropbox hasn't responded, nor has the community upvoted this request.

I would make an educated guess that the reason why Dropbox hasn't provided this functionality, and likely never will, is because this is a dangerous feature in the hands of unknown developers.

Consider the case where you write an application that uses such a delta-change update system for updating large files. You thoroughly test your app and publish it to an app store. A couple of weeks after your initial release, and numerous downloads, you start receiving bad reviews and complaints because you managed to miss a very specific test case.

Within this specific, buggy case you've miscalculated a differential offset by 1-byte. Oh no! You've now corrupted thousands of files, for hundreds of users!

Considering such a possibility, I think I would personally request that Dropbox NEVER provide such a dev feature. If they integrated such a function into the API, they would be breaking their #1 purpose-- to provide consistent, safe, & reliable cloud backups of your important files.

[*]: This was the original reference location, but it is now a dead link.

(https://www.dropbox.com/votebox/1515/delta-sync-api-for-mobile-applications)

like image 186
RLH Avatar answered Oct 19 '22 23:10

RLH