If I mistakenly delete or otherwise mess up a Note that is stored in iCloud, is there a way to restore a past version of the Note?
Assuming you have 2 devices, let's say an iPhone and iPad, there is only one thing you can do:
- delete something on your iPhone
- as soon as you notice, enable airplane mode on your iPad
- unlock iPad & open notes
- copy note to somewhere else
- turn off airplane mode
- copy note back to notes
Other than that, there unfortunately doesn't seem to be anything you can do.
Whoo hoo. Found a great solution for this issue in this question
You can use Time Machine to recover notes by restoring the 3 .sqlite files in
~/Library/Group Containers/group.com.apple.notes/ Quit Notes.app Restore those 3 files If you use iCloud, disconnect from Wifi so the notes aren't synced from your iCloud devices when you re-open Notes.app Re-open Notes.app
So just make sure your time machine is up to date and that you open notes regularly on your Mac.
Short answer is no :(. That is, unless you can get to the note before iCloud updates it, but that would not be much time at all.
Not that they are in the same class, but one can do that with Time Machine. It allows one to go back through, and it has saved and kept track of the changes that have been made to documents.
This isn't an ideal solution, but when you have notes that you absolutely need to recover, this will do. I was able to recover partial aspects of the note I had written a day later.
- Open Terminal
cd ~/Library grep -r "[Some string you remember from your note]" ./
A lot will come up. Apen any file that has a match in TextEdit (you can ignore most of them i.e the ones that are from the Calendar app etc as your note probably will not be there)
- When I did this my notes were in several pieces scattered across the file. Try to piece together the different chunks, pasting the pieces in their own new text files and saving them as .html
- Open the html files in your browser - you should be able to see the content
- Piece together your content
Again, not ideal, but this just saved me on a note that got wiped, but really needed!
Here is one tricky way that worked for me.
The local database actually stores the history version. However, the UI might not show all the historical version. So the first step is to check if the database still contains the hidden historical version that you are looking for.
To do that, you can click on the top right search bar, and search for some keywords that you can remember the historical version has but not in the latest version.
For instance, if your historical version contains a keyword "Summary", but you accidentally deleted the last section which contains "Summary", then searching for keyword "Summary" would still return the doc you wanted to recover. Meaning, when you search for keyword "Summary", the search result shows the doc you want to recover contains it, however, you can't find it. That means the Search functionality not only visits the latest version, but also visit the historical versions. That gives you chance to recover!
Once you have confirmed the text you want to recover exists in the historical version, now is time try a trick to force recover.
Step 1. open ~/Library/Group Containers/group.com.app.notes/ You should see three files:
The sqlite-wal file is the write ahead logs, it keeps the latest changes. The sqlite file is a snapshot of an old verison.
Check the modified date of these two files, if your changes happen between the modified date of these two files, then you might be able to recover.
Step 2. Quit Notes app
Step 3. Make a backup of these three files first (VERY IMPORTANT). Also make a backup of your important notes.
Step 4. Delete the
sqlite-wal file, again make sure you have made a backup of the above three files before deleting it.
Step 5. Turn off WIFI
Step 6. Open Notes app Find and check your note, and see if it's the historical version.
Step 7. Recover the latest version Once you've made a copy of the historical version of your doc. Now you may want to recover the notes to the latest version again. Simply replace the three files with the original backup.
WARNING. better to do the above steps with WIFI off, so whatever change made won't be synced to iCloud.
View → Show Note Activity
If the changes you want to roll back are small, you can trace back changes to a notes with View → Show Note Activity. When you select a history item in Note Activity, it highlights changes associated with that edit.
While you can't directly restore a version, this feature gives what you need to identity and manually redress small, unwanted changes. This answer applies to the aforementioned question, Notes.app - how to access history?.