- locate Evernote database file in Time Machine
- locate Evernote folder/Users//Library/Application\ Support/Evernote
- find database fileconduit-storage/https%3A%2F%2Fwww.evernote.com/UDB-User+RemoteGraph.sql
- copy the .sql file to some place, let say ~/Download
- do not work on the backed up file
- do not work on the current Evernote file
- find id of the note
- copy internal link of the note in Evernote: `evernote:///........///
- the second last part if the note id
- open terminal
- cd ~/Downloads
- sqlite3
- run query select TValue from Nodes_Note where TKey="", this will give metadata of the note
- looking for lookasideKey in result, looks like "Note::::content.content`
- retrieve note content, query select TValue from CacheLookaside where TKey="";, this gives the content of note which is in HTML
How do I find which is the database file?
du -s ./* | sort -n in Evernote folder
10520 ./conduit-fs
14384 ./Partitions
31088 ./logs
190096 ./conduit-storage
736112 ./resource-cache
Tried resource-cache, got nothing. Found sql files in conduit-storage. Guess it's the largest one.
How do I find which table the note is stored?
There are quite a few tables there. It should be the one with the most number of rows. Copy the .sql file to somewhere, open it with sqlite, then
ANALYZE
select stat,tbl from sqlite_stat1;
Found two tables with lots of rows, after a few trial query:
- CacheLookaside: where content of a note is stored
- Nodes_Note: store: where meta data of note is stored, in JSON