Recover an unsaved Pages document?

I somehow spent 6 hr working on a new Pages document without once saving it, and then carelessly closed the window thinking it was a different window. I have Time Machine backup. Is there a way to recover the document?

MacBook Pro (Retina, 13-inch, Late 2012), OS X Yosemite (10.10.1), 500 GB SSD

Posted on Sep 5, 2017 10:45 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 6, 2017 5:07 AM

When you click on that red traffic light in your unsaved, document title bar, the document is automatically purged, and there never was any revision history. Time Machine does capture the hidden package folder that may contain this unsaved work-in-progress document, but the Time Machine restore window will not give you access to the package folder contents to check if the document was present during the backup.


If you have not saved changes to a Pages document, and have not clicked the red traffic light on the document title bar, or just quit Pages — then there is a working copy accumulating in your local Library location:


/Users/yourname/Library/Containers/com.apple.iWork.Pages/Data/Library/Autosave Information/Unsaved Pages Document.pages


Note: You will have to right-click on the com.apple.iWork.Pages package folder (it has the yellow Pages icon) in the above path to show package contents from the secondary menu, and proceed further to the document itself.


If you plan on attempting to restore the com.apple.iWork.Pages package folder from Time Machine, make certain that Pages is actually quit beforehand, and that you copy the current package folder to your Desktop for safe-keeping. Restore the specific Pages package folder from Time Machine, and proceed into it per above to see if your document is present. If so, just drag and drop it to your Desktop, and give it a new name (without white-space). If you document is not present, then move just this package folder to the Trash, and put the original package folder back in the same location.


Finally, the first thing that you should do with a new, Pages document is save, and give it a mnemonic name. This will trigger autosave and versioning. As you make changes to the document, they will be autosaved about every 10 - 15 seconds, based on my observations. Versioning will only be useful after your second editing session.

9 replies
Question marked as Top-ranking reply

Sep 6, 2017 5:07 AM in response to hlritter

When you click on that red traffic light in your unsaved, document title bar, the document is automatically purged, and there never was any revision history. Time Machine does capture the hidden package folder that may contain this unsaved work-in-progress document, but the Time Machine restore window will not give you access to the package folder contents to check if the document was present during the backup.


If you have not saved changes to a Pages document, and have not clicked the red traffic light on the document title bar, or just quit Pages — then there is a working copy accumulating in your local Library location:


/Users/yourname/Library/Containers/com.apple.iWork.Pages/Data/Library/Autosave Information/Unsaved Pages Document.pages


Note: You will have to right-click on the com.apple.iWork.Pages package folder (it has the yellow Pages icon) in the above path to show package contents from the secondary menu, and proceed further to the document itself.


If you plan on attempting to restore the com.apple.iWork.Pages package folder from Time Machine, make certain that Pages is actually quit beforehand, and that you copy the current package folder to your Desktop for safe-keeping. Restore the specific Pages package folder from Time Machine, and proceed into it per above to see if your document is present. If so, just drag and drop it to your Desktop, and give it a new name (without white-space). If you document is not present, then move just this package folder to the Trash, and put the original package folder back in the same location.


Finally, the first thing that you should do with a new, Pages document is save, and give it a mnemonic name. This will trigger autosave and versioning. As you make changes to the document, they will be autosaved about every 10 - 15 seconds, based on my observations. Versioning will only be useful after your second editing session.

Sep 6, 2017 12:49 PM in response to hlritter

If Time Machine captures UNIX .something files, (and it does) which are known as "dot" files, then it also has captured your hidden local Library folder. You just can't see it in the Terminal without some command-line treatment.


In Terminal, get to your home folder within the Time Machine date stamp closest to the time prior to your closing that Pages document. Now, issue the following command:


chflags nohidden ./Library

ls ./Library


You should be able to proceed down the path I specified earlier. Understand that white-space in folder or filenames is taboo on the UNIX command-line, and must be escaped (e.g. /Autosave Information becomes /Autosave\ Information, etc.)

Sep 6, 2017 5:51 AM in response to VikingOSX

Viking: Thank you for your very detailed tutorial! Unfortunately, what I did was to have a couple of windows open in addition to the Pages document, and I carelessly closed the wrong one with the red Close button. It was not a matter of Quitting Pages from the menu.


But when I try to follow the path inside HDname as you specified, I find no Library folder under HDname/Users/myname, only one named lib which contains a few Lego-block icons with the extension .dylib. Using Find in the HD's window to search for Library returns nothing useful, as do searches for Data and Containers. Same under my computer's name in the Time Machine Backups folder. Can you enlighten me?


And when I wondered why there'd been no autosaved version, I realized that the document has to be named and saved in the first place for anything to be autosaved. I thought that it'd be nice if Pages and other apps that can generate a substantial body of work would offer this option – "Enable Autosave by Naming and Saving Your Document Now" or some such – as soon as a document is generated. I'll be doing that myself from now on!

Sep 6, 2017 7:54 AM in response to hlritter

Which is why you want to visit Finder Preferences : General, and change New Finder windows show: from All My Files, to the house icon with your shortname on it. Then, on the Sidebar tab, uncheck All My Files, and check your house icon.


Now, in a new Finder window, click on your house icon under Favorites, and then you can press command+J and select the Library folder visibility.

Sep 6, 2017 8:10 AM in response to VikingOSX

Ah, perfect! I've been using Macs since my Fat Mac 512K in 1985, and I never knew/had to know this.


Unfortunately, the Autosave Information folder is empty. And there is no Containers folder in the Time Machine > Backups > mycomputername > timeanddateofbackup > myHDname > Library folder. Nor is there a Library folder in Time Machine > Backups > mycomputername > timeanddateofbackup > myHDname > Users > myname, only lib.


Is there a separate way of finding a Pages scratch file on Time Machine, if there is one?


Thanks again!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Recover an unsaved Pages document?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.