Backup/Restore of notes in Notes.app, i.e. stored in iCloud (iOS, Mac OS X Mountain Lion)

meny picture meny · Dec 23, 2012 · Viewed 31.7k times · Source

I wish to make a regular backup of my notes stored on my iPhone, iPad and Mac OS in the standard Notes.app. Unfortunately since Apple moved these from their standard IMAP format to a database format (and added a separate app) this is close to impossible.

I currently have over 200 notes and growing. I suppose they are stored in a standard database format and get synced to iCloud and pushed to all devices.

Notes seems to store its data in this path:

"Library/Containers/com.apple.Notes/Data/Library/Notes/"

If anyone of you can reliable read, and perhaps even backup/restore this database, then please comment.

There is an Apple KB article HT4910 that deals with this issue, which proves of little help. In fact their method complicates issues and is very unelegant for multiple backups.

Time Machine, Apple's own built-in backup solution is also of little help as it seems to skip backup and allow no restore for notes.

I'd be grateful if someone could peruse this and come up with solutions, which would be appreciated certainly by many of the growing community of iCloud users.

Answer

Matt picture Matt · Apr 3, 2013

Ok, this is a somewhat incomplete answer but I wanted to post it so people may be able to contribute.

Using this LSOF command:

lsof -c Notes | GREP /Users/

I was able to figure out that most of the Notes.app data was being stored here:

/Users/USERNAME/Library/Containers/com.apple.Notes/Data/Library/Notes

In that folder there are three files (for me at least): NotesV1.storedata NotesV1.storedata-shm NotesV1.storedata-wal

Which strangely enough pointed me in this direction:

https://superuser.com/questions/464679/where-does-os-x-mountain-lion-store-notes-data

I also found a SqlLite cache database here:

/Users/USERNAME/Library/Containers/com.apple.Notes/Data/Library/Caches/com.apple.Notes/Cache.db

Though investigating it with Sqlite3 only turned up a few un-interesting tables:

sqlite> .tables
cfurl_cache_blob_data       cfurl_cache_response      
cfurl_cache_receiver_data   cfurl_cache_schema_version