How does Dropbox determine when to overwrite the local file vs overwrite the cloud file?

When Dropbox encounters a file on one's computer that is different than the cloud version of that file that it knows about, how does it decide whether it should sync them by overwriting the local file with the cloud file or sync them by overwriting the cloud file with the local file?

To rephrase:

  • If the server copy and the local copy of a file are different,

  • and if the dropbox program is launched and finishes syncing,

  • then these two files will be the same.

These two files will also be identical to one of the old files. My question is which --- the old server copy or the old local copy? How does it decide?


I don't know the technicalities of this, but I do have the situation where I and my assistant operate a common dropbox with two different computers going on and off at different times.

The answer to your question is that when you connect with the Cloud, Dropbox knows (somehow) that the version currently on the Cloud was originally synced from your computer. So if your computer version is different, that is the version that will be synced to the Cloud.

If two computers (say A and B) are using the same dropbox, and each make changes offline, then the first computer powers up (let's say it is computer A) will generate a sync of its update to the cloud. So now there will be same version (containing the A update) on A and Cloud.

When computer B is powered up, Dropbox will realise that computer B's version of the file is not only different from the current cloud version (which is normal) but different from the last time Dropbox synced from it. So if it were to sync B's file to the A version, B's changes would be lost. So what Dropbox does is make a copy of the B version and add "B's conflicted file" to the file name. B's original file is then synced to the A updates. The conflicted file, containing the B updates, is then synced to the cloud and back down to A.

Deletions, and conflicts arising from selective sync, are handled in a similar way

A conflict also arises if one of the computers does not close the file before powering down. Syncing does not occur on an open file, so in this case B's updates will be the ones that are synced, and A's open file will end up as a conflict. This can be a huge pain to harmonize, but this is our fault, not Dropbox's.

Hope this helps.


I have partial information which begins to answer this question. I'm not sure how useful this is to experienced users, but I know newer users like myself will find this report helpful.

As an aside, working this out makes me even more puzzled how an incredibly basic question doesn't have any official or authoritative answer. The lack of available documentation or discussions tells me that users of Dropbox are fine with taking whatever Dropbox actually does as what they would have expected it to do under those circumstances. (i.e., I wouldn't even say that users have a concrete expectation that they hold dropbox to)

Examples of how Dropbox will behave:

In my examples, computer A and computer B are never both powered on at the same time. Imagine a single user working non-collaboratively at home and work, with each computer being turned off before coming back to the other one.

What happens when one computer's dropbox folder isn't identical to the cloud dropbox folder? For maximum clarity I prefer to imagine how dropbox.exe reacts when one computer has an empty dropbox folder. Will dropbox.exe consider those missing files as "deletions" (which means it will remove them from the cloud dropbox folder) or "out of date" (which means it will create new copies of them inside the local dropbox folder).

  1. Start with situation where the behavior is plainly obvious: Computer A is on and computer B is off. If dropbox.exe is running and changes are made to A, then these are propagated to the cloud folder and not vice versa. So at the moment, if A's folder is emptied, then these missing files/folders are considered "deletions" and the cloud folder is emptied.

  2. Suppose B has an empty dropbox folder, and A creates files and sync these to the cloud dropbox folder. If we switch to computer B, the situation is that dropbox.exe will interpret B's empty dropbox folder as "out of date", and new copies from the cloud folder are created on B.

  3. Now for the less obvious: Suppose we make some changes in B and sync these changes to the cloud dropbox folder. If we switch to computer A and --- without first running dropbox.exe --- we delete things inside A's dropbox folder, what will running dropbox.exe afterwards do? In this situation dropbox.exe will interpret the missing files/folders as new deletions that should be propagated to the cloud dropbox folder.

I find it confusing that in situations 2 and 3 you have dropbox.exe being turned on and encountering the same "fresh" state on a new computer that differs from the cloud folder, but it will act differently.

If you wanted to invent a rule that explains how dropbox.exe operates, you evidently cannot assume it is a function of the three variables: (1) what it sees on the computer right now, (2) what it sees on cloud folder, and (3) which computer was last to sync with the cloud folder. (!!!)

Perhaps the extra variable is that Dropbox remembers what each computer last sync'ed to the cloud folder. In situation 2, we might assume the last time computer B sync'ed, it sync'ed an empty folder. In situation 3, Dropbox remembers that the last time computer A sync'ed, it sync'ed a folder that was different than what it presently finds inside the folder.