Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bobdobalina

macrumors 6502a
Original poster
Apr 14, 2010
515
715
It finally hapened. I ran out of application memory, many apps crashed, and I had to reboot. After rebooting, the Notes app is a blank slate. Many thousands of notes are gone. I have a backup but that is over a month old. Any way to attempt restoring the database for Notes?
 
Last edited:
Not likely if you don't have another copy, unfortunately. At least you have a backup. What about iCloud?
 
  • Like
Reactions: bobdobalina
I ALWAYS store my notes (I have around 500 after 1.5 years of using the Notes app) in iCloud! If you store them in iCloud they will always be there no matter what. Try restoring from a local snapshot, if you have one.

I also dont understand how force-rebooting your machine would get rid of ALL the notes - seems like just the one you were working on...
 
I also dont understand how force-rebooting your machine would get rid of ALL the notes - seems like just the one you were working on...
I don't either. But one of the last things I did was create a new note. Maybe that note being created without sufficient memory to save it corrupted the database for the entire program?
 
What about iCloud?

I ALWAYS store my notes (I have around 500 after 1.5 years of using the Notes app) in iCloud! If you store them in iCloud they will always be there no matter what.

Relying on iCloud for Notes is a little bit risky as there is no backup in iCloud of Notes, unlike Calendar, Contacts that do have backups in iCloud of that information (iCloud.com > Settings > Restore [Calendar|Contacts]).

And in this case, the iCloud copy MIGHT get toasted as well: Mac reboots, iCloud daemon sees notes deleted off Mac, pings iCloud to delete the notes (speculation; don't think the "deleted" notes on Mac would get moved to the Deleted folder as that is handled via user saying "delete [aka move to Deleted] note").

I know there are some that are very anti-Time Machine, but this case is a prime example for where it comes in handy. But, yeah, the month-old backup might be the only hope at this point.

Can check Library/Group Containers/group.com.apple.notes to see if there is a crash savefile for the SQLite database for Notes: some file renaming might fix things.

Long term can automate backups of Notes with Shortcuts. Find all the notes that changed in last 24 hours (or some other time frame) and save them as text files or combine into a zip file. Can launch this from a launch agent at machine start and have it set to periodically launch throughout the day.
 

Attachments

  • Notes.png
    Notes.png
    123 KB · Views: 87
  • Like
Reactions: bobdobalina
Relying on iCloud for Notes is a little bit risky as there is no backup in iCloud of Notes, unlike Calendar, Contacts that do have backups in iCloud of that information (iCloud.com > Settings > Restore [Calendar|Contacts]).

And in this case, the iCloud copy MIGHT get toasted as well: Mac reboots, iCloud daemon sees notes deleted off Mac, pings iCloud to delete the notes (speculation; don't think the "deleted" notes on Mac would get moved to the Deleted folder as that is handled via user saying "delete [aka move to Deleted] note").

I know there are some that are very anti-Time Machine, but this case is a prime example for where it comes in handy. But, yeah, the month-old backup might be the only hope at this point.

Can check Library/Group Containers/group.com.apple.notes to see if there is a crash savefile for the SQLite database for Notes: some file renaming might fix things.

Long term can automate backups of Notes with Shortcuts. Find all the notes that changed in last 24 hours (or some other time frame) and save them as text files or combine into a zip file. Can launch this from a launch agent at machine start and have it set to periodically launch throughout the day.
What is that interface? Is that in Notes or is the the interface to create a Shortcut?
 
What Mac do you have?
How much RAM is installed?
I wasn't very clear. I ran the internal SSD out of space. Then I got a message with something like: You need to close apps because the system has run out of application memory." Some apps closed or crashed by themselves. Then I hard booted the machine. At that point closing apps and deleting things no longer created free space on the drive.

It's a 2015 MBP with 16GB.
 
Last edited:
I know there are some that are very anti-Time Machine, but this case is a prime example for where it comes in handy. But, yeah, the month-old backup might be the only hope at this point.

Can check Library/Group Containers/group.com.apple.notes to see if there is a crash savefile for the SQLite database for Notes: some file renaming might fix things.
Why would anyone be against Time Machine? My only problem is not plugging that drive in frequently enough. I also make occasional CCC disk images.

I looked in Library/Group Containers/group.com.apple.notes and there is a folded named backups with an SQLite database in it. NoteStore.sqlite and NoteStore.sqlite-wm It's dated hours prior to when Notes self destructed.
 
Why would anyone be against Time Machine?

Some have had bad experiences with it. Particularly in the old days of HFS+ formatted drive (lots of hard links that could/did get messed up). Time Machine on a fresh start uses APFS snapshots these days and is more stable (imo) and faster.

Personally, never had issues with TM. And if I should ever run into issues, my most important stuff is additionally backed up to other drives, formats, methods.

The CCC image might be newer, so another option to get closer to what you had.
 
another local option is saving your notes as plain text / markdown files in a collection of folders

Programmer's text editor and choose your base notes folder as a Project, or Obsidian can work with that structure.

Just thinking out of the box. That's what I do with my Daily Journal.
 
  • Like
Reactions: bobdobalina
I wasn't very clear. I ran the internal SSD out of space. Then I got a message with something like: You need to close apps because the system has run out of application memory." Some apps closed or crashed by themselves. Then I hard booted the machine. At that point closing apps and deleting things no longer created free space on the drive.

It's a 2015 MBP with 16GB.
Any updates? Almost probably exactly what you said happened to you, I believe, happened to me. WHAT BULL!!! Like notes becomes corrupted with disk full!?!?!?! (I blame Adobe Creative Cloud - I have no idea where else my drive was getting filled from....often I point renders away from my internal harddrive but Adobe always finds a way.....)

After my minor heart attack from this annihilation, proclamations of "NO - what - NO - NOT REALLY - WTAF - NOOOO" and disbelieve, I began facebook queries (after google queries) and then at least remembered I had backed up a version in early Sept - and those and another backed up version from April worked no problem when restoring the files into the group.com.apple.notes folder, as most solutions recommended.

I also saw the "backups" NoteStore.sqlite & -wal version (like you) from just before the 'now you see it now you don't' computer restart and trash removal - to make my computer work again .... and at least the newest media I pasted in (jpgs) is still in the com folder - so I know at least something once existed.....

But other than my very old database skills coming into play from when I did things with Sql Servers on PCs (kinda fun, but I didn't plan for this relearning time!)... I am very bewildered by this SQLlite issue: "SQLite Database Disk Image is Malformed". And since I don't have a modern PC, I am finding it difficult to find a program that will "restore" it (IE https://www.sysinfotools.com/recovery/ms-sql-database-recovery.php).

But from this auto backed up corrupted file of NoteStore.sqlite - I can see the first lines of what I wrote for maybe each note since my last backup in Sept (UGH!) using TextEdit (at least there is that....)
So hopefully 3 months of whatever I wrote are somehow hopefully somewhere cryptically stored in this corrupted database - which was noted by blogs as -
Your actual notes are stored in the file [B]NoteStore.sqlite[/B]. This is an SQLite database, which does not offer simple access to most users. The related folders, such as [B]Media[/B] and [B]Fallbackimages[/B], contain the associated media files with your notes. Backing up the entire directory ensures that nothing is missing in case you need to restore your notes.

Also - I can play with good databases backed up here (https://inloop.github.io/sqlite-viewer/) to view it - but I still haven't figured out the entire table decoding (I didn't spend too much time trying to decipher it yet)....

anyone know where the corruption lives, maybe I could just delete it from the file and it could magically restore :p

But, perhaps you have just let it go by now - but if not - let me know!!!

Thanks!

meanwhile (edit after 10 minutes) I may be trying this (https://apple.stackexchange.com/questions/328059/cant-restore-my-notes-on-macos) which deals with sqllite on mac and a restore command line option....!?
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.