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?
-
1Please don't forget to mark the answer. :) – bassplayer7 Feb 27 '12 at 13:12
-
1Do you sync iCloud with your Mac AND have a backup of your mac? Or a local backup of your iOS device? – segiddins Sep 06 '12 at 01:51
-
Like someone will never accidentally Select All, Copy to paste elsewhere, and and bump the period without noticing while switching to the app i want to Paste into (not that that's ever happened to me). For something like iCloud, that you would initially expect to provide some redundancy and backup, iCloud actually makes it more fragile to complete loss catastrophe than keeping it on a single device with backups! I haven't lost a piece of data in almost 20 years the "old fashioned way" and then this comes along and slaps me in the face... – WiseOldDuck Mar 12 '23 at 17:14
-
11 Years ago???? How can that be lol – WiseOldDuck Mar 12 '23 at 17:19
6 Answers
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.
-
1If you make an edit to the version you want to keep before disabling airplane mode then that version will have the newest timestamp. – Jacksonkr Dec 09 '17 at 23:52
-
1I was looking for a complicated answer involving TimeMachine rollback but that did the trick splendidly :-) – Maciek Rek Feb 14 '21 at 09:43
Whoo hoo. Found a great solution for this issue in this question
Notes.app - how to access history?
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.
- 161
- 1
- 2
-
1I couldn't find the original handwritten note, and i couldn't get the restore to work, but I was able to go into that folder and find a preview render, Spotlight the UUID from the preview filename, and that lead me to a full rez JPG that i could copy. THANK YOU. – Doctor Eval May 24 '21 at 23:55
-
-
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.
- 14,106
-
5
-
Why in the world can't Notes support Time Machine? Isn't that the whole point of Time Machine? I tried to revert the "NotesV7.storedata-wal" file from a previous Time Machine backup just a few hours old (as suggested by another site) but Notes was very unhappy with the older version of that file. I suppose it's possible that restoring all three files could work but the other two weren't changed, so I didn't see how that could help. Apple should let TimeMachine view old versions of Notes!! – Steve Lemke Feb 21 '23 at 02:54
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
Run:
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!
- 201,078
- 11
- 1
-
1This is most likely place to grep in:
~/Library/Containers/com.apple.Notes/Data/Library/Notes/. Specifically, these two files:.//NotesV7.storedata;.//NotesV7.storedata-wal– yurkennis Jun 10 '18 at 11:11
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?.
- 1,106
-
3
-
2
-
4Wow, how is this limited to shared notes like that? It's really quite obnoxious then that Apple has actually written and implemented the entire solution but then makes some nutty assumption like only other people are capable of screwing up my Notes and intentionally disables it.
It does suggest I can share my notes with someone unimportant to protect them though which is useful to know!
– WiseOldDuck Mar 12 '23 at 17:16
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:
- NoteStore.sqlite-shm
- NoteStore.sqlite-wal
- NoteStore.sqlite
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.
- NoteStore.sqlite-shm
- NoteStore.sqlite-wal
- NoteStore.sqlite
WARNING. better to do the above steps with WIFI off, so whatever change made won't be synced to iCloud.
- 101
