14

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?

2
  • 1
    Please don't forget to mark the answer. :) Feb 27, 2012 at 13:12
  • 1
    Do you sync iCloud with your Mac AND have a backup of your mac? Or a local backup of your iOS device?
    – segiddins
    Sep 6, 2012 at 1:51

6 Answers 6

5

Assuming you have 2 devices, let's say an iPhone and iPad, there is only one thing you can do:

  1. delete something on your iPhone
  2. as soon as you notice, enable airplane mode on your iPad
  3. unlock iPad & open notes
  4. copy note to somewhere else
  5. turn off airplane mode
  6. copy note back to notes

Other than that, there unfortunately doesn't seem to be anything you can do.

2
  • 1
    If 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 9, 2017 at 23:52
  • 1
    I was looking for a complicated answer involving TimeMachine rollback but that did the trick splendidly :-)
    – Maciek Rek
    Feb 14, 2021 at 9:43
4

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.

2
  • I 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. May 24, 2021 at 23:55
  • wow, what a hack for recovering changes to a single note Aug 17 at 17:54
3

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.

1
  • 4
    Bummer. Please take note of this feature request, Apple! Feb 26, 2012 at 21:17
1

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.

  1. Open Terminal
  2. Run:

    cd ~/Library
    grep -r "[Some string you remember from your note]" ./
    
  3. 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)

  4. 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
  5. Open the html files in your browser - you should be able to see the content
  6. Piece together your content

Again, not ideal, but this just saved me on a note that got wiped, but really needed!

1
  • 1
    This 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, 2018 at 11:11
0

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.

-1

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.

Screenshot of Note Activity

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?.

2
  • 1
    This only applies to shared notes
    – Ezekiel
    Sep 6 at 22:01
  • Well that's disappointing.
    – Merchako
    Sep 7 at 20:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .