A couple of days ago I got a call from someone who had "something odd" happening on his computer. Cutting a long story short he'd been hit by ransomware and all his files were encrypted. Not I problem I thought, all the stuff that really matters is in dropbox, the PC can just get nuked.
However while dropbox allows you to restore back to previous versions there isn't a way to restore everything back to how it was at a specific time and going through each file one at a time isn't an option when you're talking about 70,000+ files!
Fortunately this exists:
https://github.com/clark800/dropbox-restore
Just give it a folder in dropbox and a date and it will delete any files created since then and roll back all files to how they were, perfect!
You need python 2.7 and pip installed.
Then use pip to install the dropbox api (pip install dropbox)
Now comes the tricky bit. Because this isn't an official app and many other people seem to have needed to use it, you have to create your own api key to run the script. To do this you have to go here: https://www.dropbox.com/developers/apps (log in)
Click the "new app" button and select these options:
API App => files and datastores => Can the app be limited... No => All file types => enter a name for the app
On the next page you get app key and secret that you paste into the restore.py script (they go in right at the top it's really obvious where).
The first time you use the script you have to visit a url in a browser to give the app access to your dropbox. That done it chugs away doing it's thing.
I suppose these ransomware things really underline the need to have some backup in place and that relying on dropbox for this job does work but isn't ideal at least not until they add something native to do this.
Hope someone finds this useful.