Rescue messed up files – with Dropbox
Mac Tip #463, 17 November 2010
Dropbox is an online service that synchronises the files you add to a particular folder, as I explained in a previous Tip. One thing it offers is that you can easily call up an earlier version of a file. That means that if you just saved changes by mistake, wiping out earlier work, you will still be able to get the earlier version back. Here’s how it works.
Save a file in Dropbox
To make things easy, let’s say you created a text file containing only the letter
A and saved the file in your Dropbox with the filename
Then you allow Dropbox to sync.
Now the file containing the letter
A exists in 2 places: on your Mac and in your Dropbox online.
Edit a saved file
Now let’s imagine that you change the file
version-test.txt. Perhaps you delete the letter
A and replace it with the letter
B. Then you save it and allow Dropbox to synchronise the file.
The old version of the file is now gone, and usually you wouldn’t be able to get it back.
Also imagine that instead of a single letter, your file contained hours of work representing a lot of painful effort. And imagine that instead of just replacing one thing with another you’d gone through making many subtle changes.
Retrieve an earlier version from Dropbox
The good news is that every time Dropbox synchronises it effectively makes a copy of the file. That means you can go back and look at all the previous saved versions.
To look at previous versions do one of the following:
- Log in to your Dropbox on the website, hover over the file, and click on the small arrow at the right-hand end of the line. A drop-down menu appears. Select
Previous versionsfrom the menu. Your web browser takes you to the Version History page for that file.
- Right click or Control (⌃) click on the file in the Finder. A Contextual menu appears; one item is
Dropbox. From that
View Previous Versions…. Your default web browser opens and takes you to the Version History page for that file.
View a previous version
Version History page shows when the file was saved and what you did, such as adding the file to Dropbox, or editing it, which machine you used for the action, and the size of the file. Note that my screenshot doesn’t show the whole page.
To Preview a particular version of the file click the magnifying glass (not shown in my screenshot) beside the relevant version.
What happens next rather depends…
If you preview a file that a web browser can display, you should see the file in the way you expect. For example, I was able to see my file contained the letter
A when I first created it.
However, if your file can’t be displayed by a web browser you may just see (apparent) garbage.
Your browser should be able to show you what’s in text files, jpg images (photos), HTML files, PDFs.
Restore a previous version
Even if you can’t preview a particular version online, you can still restore any of the previous versions of the file.
Note: you may like to save the current file under a different name if you want to easily compare the current document with the version you will restore.
The version you select replaces the version in the Dropbox folder on your computer.
- Show the Version History as described above.
- Check the radio button beside the version you want to retrieve.
- Click the
If you use Growl, an alert appears that the file has been restored.
If you need to though, you can still go back and restore a more recent version. Follow the steps above to choose a version from the Version History.
Keep current projects in Dropbox
The Version History is a wonderful thing. We’ve all messed up by saving unwanted changes into files.
I keep all my ‘working’ files in Dropbox — anything I’m writing, files I need for reference. If I mess up, it takes only a moment to restore an earlier state.
A few years ago, before Dropbox, I experimented with a Version Control system. It was hard to set up, and hard to work with. I never did get it right or really understand what it was meant to do, or how I was supposed to work with it.
Dropbox makes it so easy to keep older copies of files and to go back and view those versions. Why wouldn’t you use it?
Tell us in the Comments about how you’ve used Dropbox and its version control.