An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Topic Options
#51371 - 03/20/19 06:47 AM Notes gone bye-bye
ryck Offline


Registered: 08/04/09
Loc: Okanagan Valley
Something has wiped out all the data in my Notes (High Sierra upgrade?). What's the right file, and where do I find it, in order to restore with Time Machine?
_________________________
ryck

iMac (Retina 5K, 27", 2017), 3.4 GHz Intel Core i5, 8GB RAM, 2400 MHz DDR4
OS High Sierra 10.13.6
Canon MX710 Printer
Epson Perfection V500 Photo Scanner
Time Machine on 320GB OWC Mercury OTG Pro
Carbon Copy Clone on 500GB OWC Mercury OTG Pro

Top
#51373 - 03/20/19 09:04 AM Re: Notes gone bye-bye [Re: ryck]
Ira L Offline


Registered: 08/13/09
Loc: California
You might try looking in ~/Library/Containers/com.apple.Notes/Data/Library/Notes/.
_________________________
On a Mac since 1984.
Currently: 27" iMacs, Macbook Air, macOS 10.14.x,; iPhones, iPods and iPads galore!

Top
#51379 - 03/21/19 06:40 AM Re: Notes gone bye-bye [Re: Ira L]
ryck Offline


Registered: 08/04/09
Loc: Okanagan Valley
I went there, using "Go to Folder" and the Notes folder had three items:

Notes V7.storedata
Notes V7.storedata-stm
Notes V7.storedata-wal

In Time Machine, I went to the latest backup available (last November) but only "Notes V7.storedata-stm" made the Restore button functional. A restoration attempt left me with a still-empty Notes app. So, I am assuming, if the upgrade to High Sierra caused the data in Notes to disappear, an empty restore attempt makes sense because the OS update was prior to the last available Time Machine backup.

Moving on.....I wonder why the three items in the Notes folder all start with "Notes V7" ? My Notes app says it is V4.5.

Almost happy ending.....The most critical piece of information in my Notes has since been provided by a colleague down east. However, I lost all the "how to" procedures I had collected over time from replies to peoples' queries at FTM. Sigh.


Edited by ryck (03/21/19 06:44 AM)
_________________________
ryck

iMac (Retina 5K, 27", 2017), 3.4 GHz Intel Core i5, 8GB RAM, 2400 MHz DDR4
OS High Sierra 10.13.6
Canon MX710 Printer
Epson Perfection V500 Photo Scanner
Time Machine on 320GB OWC Mercury OTG Pro
Carbon Copy Clone on 500GB OWC Mercury OTG Pro

Top
#51380 - 03/21/19 07:27 AM Re: Notes gone bye-bye [Re: ryck]
jchuzi Online


Registered: 08/04/09
Loc: New York State
Have you tried running Repair Disk with Disk Utility or rebuilding the directory with Disk Warrior or similar?
_________________________
Jon

OS 10.14.5, iMac Retina 5K 27-inch, late 2014, 3.5 GHz Intel Core i5, 1 TB fusion drive, 16 GB RAM, Epson SureColor P600, Photoshop CC, Lightroom CC, MS Office 365

Top
#51381 - 03/21/19 08:37 AM Re: Notes gone bye-bye [Re: jchuzi]
ryck Offline


Registered: 08/04/09
Loc: Okanagan Valley
Not yet, but I'll give it a try.
_________________________
ryck

iMac (Retina 5K, 27", 2017), 3.4 GHz Intel Core i5, 8GB RAM, 2400 MHz DDR4
OS High Sierra 10.13.6
Canon MX710 Printer
Epson Perfection V500 Photo Scanner
Time Machine on 320GB OWC Mercury OTG Pro
Carbon Copy Clone on 500GB OWC Mercury OTG Pro

Top
#51383 - 03/21/19 08:55 AM Re: Notes gone bye-bye [Re: ryck]
Virtual1 Offline


Registered: 08/04/09
Loc: Iowa
iirc, WALL files ars SQL databases. so that's probably where your notes are. yes, restore from time machine may be helpful
correction, the storedata is the one you need

Code:
sqlite3 Library/Containers/com.apple.Notes/Data/Library/Notes/NotesV7.storedata .schema

sqlite3 NotesV7.storedata .schema
CREATE TABLE ZATTACHMENT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZNOTE INTEGER, Z10_NOTE INTEGER, ZCONTENTID VARCHAR, ZFILEURL BLOB );
CREATE INDEX ZATTACHMENT_ZNOTE_INDEX ON ZATTACHMENT (ZNOTE);
CREATE TABLE ZFOLDER ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZACCOUNT INTEGER, Z1_ACCOUNT INTEGER, ZPARENT INTEGER, Z6_PARENT INTEGER, ZISDISTINGUISHED INTEGER, ZALLEGEDHIGHESTMODIFICATIONSEQUENCE INTEGER, ZCOMPUTEDHIGHESTMODIFICATIONSEQUENCE INTEGER, ZUIDNEXT INTEGER, ZUIDVALIDITY INTEGER, ZTRASHACCOUNT INTEGER, Z1_TRASHACCOUNT INTEGER, ZNAME VARCHAR, ZCHANGEKEY VARCHAR, ZFOLDERID VARCHAR, ZSYNCSTATE VARCHAR, ZSERVERNAME VARCHAR );
CREATE INDEX ZFOLDER_ZACCOUNT_INDEX ON ZFOLDER (ZACCOUNT);
CREATE INDEX ZFOLDER_ZPARENT_INDEX ON ZFOLDER (ZPARENT);
CREATE INDEX ZFOLDER_ZTRASHACCOUNT_INDEX ON ZFOLDER (ZTRASHACCOUNT);
CREATE INDEX ZFOLDER_Z_ENT_INDEX ON ZFOLDER (Z_ENT);
CREATE TABLE ZNOTEBODY ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZNOTE INTEGER, Z10_NOTE INTEGER, ZHTMLSTRING VARCHAR );
CREATE INDEX ZNOTEBODY_ZNOTE_INDEX ON ZNOTEBODY (ZNOTE);
CREATE TABLE ZOFFLINEACTION ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZSEQUENCENUMBER INTEGER, ZACCOUNT INTEGER, Z1_ACCOUNT INTEGER, ZFOLDER INTEGER, Z6_FOLDER INTEGER, ZPARENT INTEGER, Z6_PARENT INTEGER, ZORIGINALPARENT INTEGER, Z6_ORIGINALPARENT INTEGER, ZFOLDER1 INTEGER, Z6_FOLDER1 INTEGER, ZNOTE INTEGER, Z10_NOTE INTEGER, ZORIGINALFOLDER INTEGER, Z6_ORIGINALFOLDER INTEGER );
CREATE INDEX ZOFFLINEACTION_ZSEQUENCENUMBER_INDEX ON ZOFFLINEACTION (ZSEQUENCENUMBER);
CREATE INDEX ZOFFLINEACTION_ZACCOUNT_INDEX ON ZOFFLINEACTION (ZACCOUNT);
CREATE INDEX ZOFFLINEACTION_ZFOLDER_INDEX ON ZOFFLINEACTION (ZFOLDER);
CREATE INDEX ZOFFLINEACTION_ZPARENT_INDEX ON ZOFFLINEACTION (ZPARENT);
CREATE INDEX ZOFFLINEACTION_ZORIGINALPARENT_INDEX ON ZOFFLINEACTION (ZORIGINALPARENT);
CREATE INDEX ZOFFLINEACTION_ZFOLDER1_INDEX ON ZOFFLINEACTION (ZFOLDER1);
CREATE INDEX ZOFFLINEACTION_ZNOTE_INDEX ON ZOFFLINEACTION (ZNOTE);
CREATE INDEX ZOFFLINEACTION_ZORIGINALFOLDER_INDEX ON ZOFFLINEACTION (ZORIGINALFOLDER);
CREATE INDEX ZOFFLINEACTION_Z_ENT_INDEX ON ZOFFLINEACTION (Z_ENT);
CREATE TABLE Z_PRIMARYKEY (Z_ENT INTEGER PRIMARY KEY, Z_NAME VARCHAR, Z_SUPER INTEGER, Z_MAX INTEGER);
CREATE TABLE Z_METADATA (Z_VERSION INTEGER PRIMARY KEY, Z_UUID VARCHAR(255), Z_PLIST BLOB);
CREATE TABLE Z_MODELCACHE (Z_CONTENT BLOB);
CREATE TABLE ZACCOUNT ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZALLOWINSECUREAUTHENTICATION INTEGER, ZDIDCHOOSETOMIGRATE INTEGER, ZENABLED INTEGER, ZROOTFOLDER INTEGER, Z6_ROOTFOLDER INTEGER, ZTRASHFOLDER INTEGER, ZGMAILCAPABILITIESSUPPORT INTEGER, ZPORT INTEGER, ZSECURITYLAYERTYPE INTEGER, ZMIGRATIONOFFERED INTEGER, ZACCOUNTDESCRIPTION VARCHAR, ZEMAILADDRESS VARCHAR, ZFULLNAME VARCHAR, ZPARENTACACCOUNTIDENTIFIER VARCHAR, ZUSERNAME VARCHAR, ZFOLDERHIERARCHYSYNCSTATE VARCHAR, ZAUTHENTICATION VARCHAR, ZHOSTNAME VARCHAR, ZSERVERPATHPREFIX VARCHAR, ZEXTERNALURL BLOB, ZINTERNALURL BLOB, ZLASTUSEDAUTODISCOVERURL BLOB, ZTLSCERTIFICATE BLOB );
CREATE INDEX ZACCOUNT_ZROOTFOLDER_INDEX ON ZACCOUNT (ZROOTFOLDER);
CREATE INDEX ZACCOUNT_ZTRASHFOLDER_INDEX ON ZACCOUNT (ZTRASHFOLDER);
CREATE INDEX ZACCOUNT_Z_ENT_INDEX ON ZACCOUNT (Z_ENT);
CREATE TABLE ZNOTE ( Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, Z_OPT INTEGER, ZBODY INTEGER, ZFOLDER INTEGER, Z6_FOLDER INTEGER, ZMIMEDATASIZE INTEGER, ZDATECREATED TIMESTAMP, ZDATEEDITED TIMESTAMP, ZREMOTEID VARCHAR, ZTITLE VARCHAR, ZCHANGEKEY VARCHAR, ZUNIVERSALLYUNIQUEID BLOB );
CREATE INDEX ZNOTE_ZBODY_INDEX ON ZNOTE (ZBODY);
CREATE INDEX ZNOTE_ZFOLDER_INDEX ON ZNOTE (ZFOLDER);
CREATE INDEX ZNOTE_Z_ENT_INDEX ON ZNOTE (Z_ENT);

_________________________
I work for the Department of Redundancy Department

Top
#51389 - 03/21/19 11:18 AM Re: Notes gone bye-bye [Re: Virtual1]
ryck Offline


Registered: 08/04/09
Loc: Okanagan Valley
Just so I'm clear....is your "Code:" something I should pop into Terminal?
_________________________
ryck

iMac (Retina 5K, 27", 2017), 3.4 GHz Intel Core i5, 8GB RAM, 2400 MHz DDR4
OS High Sierra 10.13.6
Canon MX710 Printer
Epson Perfection V500 Photo Scanner
Time Machine on 320GB OWC Mercury OTG Pro
Carbon Copy Clone on 500GB OWC Mercury OTG Pro

Top
#51448 - 04/04/19 10:48 AM Re: Notes gone bye-bye [Re: ryck]
Virtual1 Offline


Registered: 08/04/09
Loc: Iowa
Code:
sqlite3 Library/Containers/com.apple.Notes/Data/Library/Notes/NotesV7.storedata .schema


that is just something I typed into terminal, and the rest of the post was the data that sqlite3 retrieved from the specified database by asking for the database's "schema" (structure)

this will hopefully barf up some html-ish text which contains the body of all of your notes at once, in a jumbled up mess that may be useful to you:

Code:
sqlite3 Library/Containers/com.apple.Notes/Data/Library/Notes/NotesV7.storedata "SELECT * FROM ZNOTEBODY" | sed 's/ / /g'
_________________________
I work for the Department of Redundancy Department

Top

Moderator:  alternaut, dkmarsh, joemikeb