20Azartguy16

Q: How to recover Notes from NotesV6

I had to reset my Apple ID, Apple Support walked me through it, but somehow all my Notes were deleted. After much searching online it seems the only backup is in the Library in 3 NotesV6 files. But all I can "see" is line after line of this (below)

SQLite format 3   @  YO" *    Y-Ê

   ˚J ˚ $ g

˚   ¥ S fl Ñ R ˇ ¶ S ™ G è ¯ w˘|   E) Å indexZOFFLINEACTION_ZFOLDER_INDEXZOFFLINEACTION CREATE INDEX

 

so how can I get to the data (files) so I can recreate the Notes?  Is there a way to delete all the code and leave the Notes text itself? Help, and thanks

iMac, OS X El Capitan (10.11.6), null

Posted on Sep 5, 2016 2:21 PM

Close

Q: How to recover Notes from NotesV6

  • All replies
  • Helpful answers

  • by Barney-15E,

    Barney-15E Barney-15E Sep 6, 2016 5:00 AM in response to 20Azartguy16
    Level 8 (49,623 points)
    Mac OS X
    Sep 6, 2016 5:00 AM in response to 20Azartguy16

    That is a sqlite3 database. It is not "code", but structure.

     

    Open Terminal and type the following, leaving a space after it--don't hit return

    sqlite3

    Drag the notesV6 file into the Terminal window and hit return.

    Sqlite will load the file. You should see a sqlite command prompt:

    sqlite>

    At the sqlite prompt, enter the following and hit return--yes, the semicolon is important.

    select ZHTMLSTRING from ZNOTEBODY;

    Copy the text that is dumped out in the terminal window and paste it into a text editor. Save the file with an .html extension.

    Open the file in Safari and cut/paste the individual notes.

    To quit sqlite, type .quit and hit return.

  • by 20Azartguy16,

    20Azartguy16 20Azartguy16 Sep 6, 2016 1:49 PM in response to Barney-15E
    Level 1 (4 points)
    Mac OS X
    Sep 6, 2016 1:49 PM in response to Barney-15E

    Thanks, but I keep getting this terminal line and can't get any further:

    Error: near "selectZHTMLSTRINGfromZNOTEBODY": syntax error

    sqlite>

  • by Barney-15E,

    Barney-15E Barney-15E Sep 6, 2016 2:15 PM in response to 20Azartguy16
    Level 8 (49,623 points)
    Mac OS X
    Sep 6, 2016 2:15 PM in response to 20Azartguy16

    You didn't leave spaces between the words. You can just copy and paste Amanda's iPhone

  • by 20Azartguy16,

    20Azartguy16 20Azartguy16 Sep 6, 2016 3:22 PM in response to Barney-15E
    Level 1 (4 points)
    Mac OS X
    Sep 6, 2016 3:22 PM in response to Barney-15E

    I tried it both ways, with and without spaces. I also tried cut n'paste. Got the same error.

  • by Barney-15E,

    Barney-15E Barney-15E Sep 6, 2016 3:27 PM in response to 20Azartguy16
    Level 8 (49,623 points)
    Mac OS X
    Sep 6, 2016 3:27 PM in response to 20Azartguy16

    If you copy and paste you get the same error as you posted above?

    Even if you had the wrong database open, there would be no syntax error in that string I posted.

     

    If so, I have no idea what you are doing wrong. I can copy and paste that string and it returns the notes from my db.

  • by 20Azartguy16,

    20Azartguy16 20Azartguy16 Sep 6, 2016 10:14 PM in response to Barney-15E
    Level 1 (4 points)
    Mac OS X
    Sep 6, 2016 10:14 PM in response to Barney-15E

    No "syntax error" this time, but nothing else either is "dumped out."

     

    I'm not doing anything wrong, it simply isn't working (my wife just followed this from scratch and got the same response, both entering it and copy n'pasting).Thanks for trying...

    Screen Shot 2016-09-06 at 10.04.28 PM.png

  • by Barney-15E,

    Barney-15E Barney-15E Sep 7, 2016 4:36 AM in response to 20Azartguy16
    Level 8 (49,623 points)
    Mac OS X
    Sep 7, 2016 4:36 AM in response to 20Azartguy16

    If it doesn't dump anything out, there is nothing there int that table.

    I can't find a field in any of the other tables in that file which would have the text of the Note.

     

    You might try looking into the CoreData/ExternalRecords folder, if you still have the Container. In that will be HTMLNotes and NotesV4. Buried in those will be various <somethingNote> folders (IMAPNote, EWSNote, etc). If there are any files in the _records subfolders, you might find some notes buried in them. Those files can be QuickLooked and opened with Notes, however, when I open them with Notes, it doesn't display what I just opened, so it may not be easily extracted.