How to recover notes by modifying NotesVxxx.storedata database?
Dear Apple Technical Support,
I am currently helping a client and have spent several days hunting down a clean way to retrieve Notes that were lost in the process of accidentally disconnecting an Internet Account on Mac OSX (El Capitan) in System Preferences --> Internet Accounts:
Unfortunately, they did not see that the Notes were attached to this "Msn" account and not "On My Mac" In addition, this account functioned "offline" for a little over a year and after I disconnected and reconnected the account, it only recovered notes from Jan '18 - Aug '18.
I am still missing notes from Aug '18 - present.
Unfortunately, Time Machine and iCloud were not options because the laptop was not properly configured. Because of this situation, I was forced to do some digging and found 3 files that had the data.
~/Library/Containers/com.apple.Notes/Data/Library/Notes/NotesV6.storedata-wal
~/Library/Containers/com.apple.Notes/Data/Library/Notes/NotesV6.storedata
~/Library/Containers/com.apple.Notes/Data/Library/Notes/NotesV6.storedata-shm
I looked into these files using SQLite3 and found all of the notes, but all were encrypted. I found a solution to recover these as suggested in this forum, https://discussions.apple.com/thread/8402323, but it would be a real pain to recover 65k of these notes going through the forum's method.
Recently, I had an idea that might be cleaner, and looked into modifying the NotesV6.storedata database using SQLite3 and SQL commands, and re-point those notes in database to the current "On My Mac" account.
How do I go about doing this?
Thank you.
-Kelly
MacBook Pro 15″, OS X 10.11