Recover lost data in Lion
Mac Tip #533, 25 April 2012
The other day I accidentally deleted a line from a spreadsheet, but didn’t realise until the Undo command was no use. Luckily, since I’m using Lion, all I had to do was call up the automatically saved older versions of the file, then copy and paste the line I needed. Here’s how you can do that too, when you need it.
I prefer writing Tips to fundraising, so please donate if you can. We need just $260 more to cover this year. In April each year (and only April) I raise funds to help MacTips cover its costs for the whole year. I owe a huge thank you to the 26 special people who’ve already helped so much! If 26 more would donate $10 each in the next 5 days we’d meet our goal. Will you donate?
Revert Document…from the
Browse All Versions….
- Select a previous version by clicking in the timeline.
- Copy data from the old document then paste the data in your current document.
Want more detail? Read the full Tip below.
Lion and versions
Lion (OS 10.7) introduced a new feature to the Mac Operating System: versions. If you use software that supports it, the Mac quietly saves versions of the documents you’re working on without you having to do a thing.
Then, if you need to, you can quickly and easily check older versions of your document, perhaps retrieving lost information.
This is different from Time Machine and other backups because it’s more integrated and the older versions are available from within the document itself.
Not all software gives you access to these versions, so first you need to know how to tell whether you can access versions or not.
Does my app have Versions?
One app I use a lot is Numbers ’09 for creating and editing spreadsheets. Numbers.app does have versions, as do various other apps.
The easiest way to tell if the app you’re using has versions is to visit the
File menu and look for the item
Save a Version with the keyboard shortcut
Command (⌘) S.
That command allows you to deliberately save a version, but if you don’t use it then the document saves versions automatically at regular intervals.
If your app instead assigns
Command (⌘) S to Save a document, then it’s not using versions.
Look for an arrow in the document’s Toolbar Title area
In an app that does save versions look at the top of a document window — at the top of the Toolbar, if there is one. Beside the name of the document you may see the word
Edited or the word
Beside that word is an invisible small arrow. Move your mouse over the word
Locked and the arrow becomes visible. Click the arrow to reveal a menu.
My screenshot shows that I’ve clicked on the previously invisible arrow to reveal a menu of actions, including
Browse All Versions….
Browse All Versions
I have one particular spreadsheet I’ve edited almost every day since 01 January 2012. Thanks to Versions, I can go back to any day since then and call up the document as it was on that day. Unfortunately the data is confidential, so I can’t use it as an example in this Tip.
For this Tip I’ll use a document I created a couple of months ago and edit around once per month.
Let’s say I accidentally deleted the contents of some cells and didn’t notice until it was too late to Undo. This can easily happen when you’re distracted, or a cat walks on the keyboard, or you brush the trackpad the wrong way. If this kind of thing happens to you:
- Click the arrow beside the document’s name in the document’s Toolbar, as shown in the screenshot above. A menu appears. OR
Revert Document…from the
Filemenu. A Sheet appears, with the words
Do you want to revert the document "[name]" to a previous state? You can revert it to the state it was in when you last saved it, or browse older versions. Recent changes will be saved in your version history..
Browse All Versions…. The screen background picture changes. Your document shrinks on screen and moves to left of centre. A stack of previous versions is displayed beside it on the right-hand side of the screen. A timeline with grey bars appears beside the right edge of the screen.
View an older Version
Browse All Versions… command puts your current version of the document on the left of the screen, with all previous saved versions in a stack beside it. There are controls below the documents. The next screenshots show the whole screen (cropped to remove parts that don’t show anything helpful), then the left and right sides (overlapping) individually so you can see more detail.
Copy and Paste individual items of information
Select a previous version by clicking in the timeline. That date’s version is displayed on the right. Below it a small box displays the date and time that version was saved.
Copy data from the old document then click on your current document and paste the data. When you’ve finished, click the
Done button. The stack of older versions disappears and your current document takes up its usual space on screen.
There are plenty of other things you can do with Versions, but I’ll leave them for later Tips.
Also see these older MacTips about Lion, Numbers or Versions
- Lions don’t save — or do they?
- OS X Lion has done away with saving — more or less. After saving a document the first time you don’t need to save again. Or that’s the theory, anyway, because not all apps offer this new feature.
- How to make a simple year planner in Numbers.app
- It’s easy to make yourself a year planner using Numbers.app, an inexpensive spreadsheet application from Apple.
- How to fill a series of dates in Numbers.app
- Numbers.app doesn’t easily reveal how to fill a series of separated dates, eg dates a week apart, but it’s simple once you know the trick.
Let us know how this Tip helped you. To leave a comment if you’re reading this by email or RSS feed please visit the Tip at the MacTips website. There should be a link from the title.