About two months later when I was preparing for a defence of my PhD thesis, I was looking for an old presentation but couldn't find it. The directory was there but it was empty. I would have never deleted these files, something must have gone wrong. I contacted Dropbox support which then broke the news to me: there was a delete event of 8343 files from 2014-04-29 at 14:57:30 GMT (UTC). Looking at the log record from this event, I realised most of the missing files were my photos! All the directories were still in place but many of them were empty, as if Dropbox randomly deleted some files and left some others intact. I was devastated. All those memories and the effort with collecting and organizing the photos…. gone.
From all this information it seems that Dropbox client first deletes files locally before it informs the server about the new selective sync settings. Consequently, if the client crashes or is killed before the server is contacted, the files remain deleted without any trace. After the client restarts again, it only sees there are some files missing and syncs this new state with the server. Unfortunately for me, Dropbox only keeps a copy of deleted files for 30 days (unless you pay $40/year for some Packrat feature) and I found out about this event after two months.
While I love Dropbox and Google Drive, I still recommend backing up to a Time Machine drive and an offsite cloud service like Backblaze. This is also why I still keep my pictures stored locally on my Mac even if I am syncing them to Google or Dropbox (selective sync on my pictures folder is off). At the end of the day, I don't trust anyone (even Apple) with the only copies of the only piece of data that I can't re-create or purchase.
Link via @lindertobias