An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
Notes gone bye-bye
#51371 03/20/19 01:47 PM
Joined: Aug 2009
Likes: 14
ryck Offline OP
OP Offline

Joined: Aug 2009
Likes: 14
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

"What Were Once Vices Are Now Habits" The Doobie Brothers

iMac (Retina 5K, 27", 2020), 3.8 GHz 8 Core Intel Core i7, 8GB RAM, 2667 MHz DDR4
OS Ventura 13.6.3
Canon Pixma TR 8520 Printer
Epson Perfection V500 Photo Scanner c/w VueScan software
TM on 1TB LaCie USB-C
Re: Notes gone bye-bye
ryck #51373 03/20/19 04:04 PM
Joined: Aug 2009
Likes: 8
Online

Joined: Aug 2009
Likes: 8
You might try looking in ~/Library/Containers/com.apple.Notes/Data/Library/Notes/.


On a Mac since 1984.
Currently: 24" M1 iMac, M2 Pro Mac mini with 27" BenQ monitor, M2 Macbook Air, MacOS 14.x; iPhones, iPods (yes, still) and iPads.
Re: Notes gone bye-bye
Ira L #51379 03/21/19 01:40 PM
Joined: Aug 2009
Likes: 14
ryck Offline OP
OP Offline

Joined: Aug 2009
Likes: 14
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.

Last edited by ryck; 03/21/19 01:44 PM.

ryck

"What Were Once Vices Are Now Habits" The Doobie Brothers

iMac (Retina 5K, 27", 2020), 3.8 GHz 8 Core Intel Core i7, 8GB RAM, 2667 MHz DDR4
OS Ventura 13.6.3
Canon Pixma TR 8520 Printer
Epson Perfection V500 Photo Scanner c/w VueScan software
TM on 1TB LaCie USB-C
Re: Notes gone bye-bye
ryck #51380 03/21/19 02:27 PM
Joined: Aug 2009
Likes: 7
Online

Joined: Aug 2009
Likes: 7
Have you tried running Repair Disk with Disk Utility or rebuilding the directory with Disk Warrior or similar?


Jon

macOS 11.7.10, 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
Re: Notes gone bye-bye
jchuzi #51381 03/21/19 03:37 PM
Joined: Aug 2009
Likes: 14
ryck Offline OP
OP Offline

Joined: Aug 2009
Likes: 14
Not yet, but I'll give it a try.


ryck

"What Were Once Vices Are Now Habits" The Doobie Brothers

iMac (Retina 5K, 27", 2020), 3.8 GHz 8 Core Intel Core i7, 8GB RAM, 2667 MHz DDR4
OS Ventura 13.6.3
Canon Pixma TR 8520 Printer
Epson Perfection V500 Photo Scanner c/w VueScan software
TM on 1TB LaCie USB-C
Re: Notes gone bye-bye
ryck #51383 03/21/19 03:55 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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
Re: Notes gone bye-bye
Virtual1 #51389 03/21/19 06:18 PM
Joined: Aug 2009
Likes: 14
ryck Offline OP
OP Offline

Joined: Aug 2009
Likes: 14
Just so I'm clear....is your "Code:" something I should pop into Terminal?


ryck

"What Were Once Vices Are Now Habits" The Doobie Brothers

iMac (Retina 5K, 27", 2020), 3.8 GHz 8 Core Intel Core i7, 8GB RAM, 2667 MHz DDR4
OS Ventura 13.6.3
Canon Pixma TR 8520 Printer
Epson Perfection V500 Photo Scanner c/w VueScan software
TM on 1TB LaCie USB-C
Re: Notes gone bye-bye
ryck #51448 04/04/19 05:48 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
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

Moderated by  alternaut, dkmarsh, joemikeb 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.021s Queries: 30 (0.016s) Memory: 0.6128 MB (Peak: 0.6988 MB) Data Comp: Zlib Server Time: 2024-03-28 17:10:53 UTC
Valid HTML 5 and Valid CSS