The notes I had on my local computer have recently vanished. I tried converting the files found in the "Notes backup" location to HTML as suggested by this site but that only yielded 1 useful note.

I recently discovered that if I search for a certain keyword I KNOW will be in the note, that it will still pop up via Spotlight and moreover the whole note will be scrollable. Unfortunately, I can't copy/paste those contents (only scroll) and I don't remember all the notes to even be able to search for them.

I don't imagine the Spotlight index will last long....

Question: Is there some code I could run in the terminal which would convert/export all the indexed "Notes" contained in the Spotlight Index to some easily accessible form? (e.g. generate text files into some folder on my desktop)

Edit: Time Machine was not turned on.

Edit/Solved: I managed to get my notes back by removing all the accounts I had within apple.

  • You can recover them from a backup (according to the linked answer at apple.stackexchange.com/a/117145, they are stored in ~/Library/Containers/com.apple.Notes/Data/Library/Notes). No backup? mdfind, a command finds files matching a Spotlight query, might be a starting point. Run it with the appropriate keyword and check whether the listed files still exist. If that's not the case, open the folder with Finder and enter Time Machine, maybe you lucky enough and some files are still recoverable from local snapshots (see support.apple.com/en-us/HT204015). – jaume Aug 7 '18 at 19:43
  • 1
    Spotlight's metadata is inside a hidden .Spotlight-V100 folder at the root of the indexed volume (superuser.com/a/82109). The folder contains lots of binary files and I don't know of any tool to "read" them, but I'd copy the folder to a safe place to prevent those cached notes from being lost.. – jaume Aug 7 '18 at 20:15
  • @jaume (1) Backing up the Spotlight folder was a good idea (2) I tried the Notes backup folder (both converting to HTML and opening via SQL Lite but it didn't seem to have all the notes) (3) Time Machine wasn't active. Thanks for your input. – Afflatus Aug 8 '18 at 16:41

You must log in to answer this question.

Browse other questions tagged .