Scanning your iPhone Backup Files
Here's a nice way to recover notes from your iPhone without having to mail them to yourself--although it's not for the faint of heart. James Duncan Davidson located where iTunes stores its iPhone backup data--at least mostly. There's an error in his write-up. It's actually stored in your home folder's application support directory in MobileSync/Backup. For me, that works out to be /Users/ericasadun/Library/Application Support/MobileSync/Backup. But getting back to Duncan Davidson's story, he took a peek at those files and noticed they were some sort of compressed SQLite3 files.
Following on that, "Mr. Flip", who is one of the iPhone web developer Google group members posted this simple extraction utility written in Perl. When run, it converts each of the backup files to a normal well-named SQLite3 db file. Following Flip's directions, I then downloaded a copy of the OS X version of SQLite Browser from Sourceforge and used it to view the contents of the backup db files.
Interestingly enough, when viewing the db files directly from the command line (via sqlite3 notes_01.db and .dump) I discovered that the iPhone saved my entire history of edits for my note files as well as the actual final content.


Reader Comments (Page 1 of 1)
Andrew Burke said 4:22PM on 7-10-2007
My big question is: Has your typing improved since you wrote that note?
Reply
digitalintrigue said 4:52PM on 7-10-2007
Interesting. Looks like SMS messages are also stored in that directory...
Reply
Josh H. said 4:53PM on 7-10-2007
In other words, just email them to yourself and then copy and paste them. I don't think this is worth all the trouble. Plus I have heard rumors of Leopard containing a feature to automatically do this.
www.mntdev.com
Reply
tickmo said 5:11PM on 7-10-2007
Off the top of my head, this sounds like a Time machine-type function, you just sync notes back and forth from iPhone with previous versions in tact. Ideally this would be for more than just notes, eg, Word documents, Visio or OmniGraffle support (i know, i am dreaming, but imagine creating and interacting with your dIagrams with the multitouch screen =)
Reply
Leonard Nimrod said 2:42AM on 7-11-2007
Note Syncing will surely be available when Leopard comes out as Mail 3.0 has a built-in Notes and To Do feature.
Reply
DWBjr said 5:02AM on 7-11-2007
Looks like the calendar is in there too. Oh... this is gonna be interesting.
Reply
ct said 8:22AM on 7-11-2007
Why can't the thing just sync your notes to stickies or whatever? Why all the mystery? I had high hopes for the sync, but it really seems to blow.
Reply
Jeremy said 3:59PM on 7-11-2007
So this will help if you forget to backup or save your notes from your iphone, correct? Eg, if I nuke my stuff, this hack would help me go & find my missing files? That's actually very cool. My palm PDA isn't capable of this, and it's nice to know that you get a second chance with apple. Must buy an iphone :)
Reply
hayosh said 5:27PM on 7-11-2007
Erica,
I think you missed the '~' in Duncan's story. Which, for you, would be short for '/Users/ericasadun.'
Reply
Chris said 2:59PM on 7-15-2007
Does it also back up photos? I have lost my photos after the restore. I did the restore because iphoto would not recognize the iphone.
Reply
Masque said 2:12AM on 7-17-2007
For Mac users only: If you prefer to see all the files backed up, try http://calmstorm.net/iphone/unravel.perl
It writes out a copy of the tree that's backed up. Lots of interesting plists in there, alongside the sqlite databases.
Reply
BrianW said 8:14AM on 7-18-2007
I just had to restore my iPhone, and noticed that the Notes were not restored. I'm using a Windows machine. Anyone else see this? Wondering if there's possibly a bug with the Windows version of iTunes, and/or with iTunes in general?
Reply
Brad said 9:01AM on 7-25-2007
Wow, thanks so much ...
I've been keeping a food and sleep log for my doctor, but my kids (4 and 5) deleted my notes yesterday apparently ...
This has saved me ...
NOTE, the full note body is stored in the db:table
notes_01.db:note_bodies
Thanks again!
Reply
bgcat57 said 2:59PM on 7-31-2007
Moron question probably, but here goes...
How do I run a perl script? I'm not familiar with the script (other than knowing the name).
Do I need a special compiler or application? Whats the command string? etc.
Reply
martin west said 2:06AM on 8-16-2007
Does anyone know where they are stored in windows?
Reply
elbow said 8:49PM on 8-21-2007
In Windows, it's in
C:\Documents and Settings\\Application Data\Apple Computer\MobileSync\Backup\
Reply
NetMage said 1:17PM on 8-26-2007
FYI, David's write-up is correct - the tilde is the standard Unix abbreviation for your home directory.
Reply
Erica Sadun said 1:37PM on 8-26-2007
I'm guessing he fixed the typo after my post.
Reply
VaughnSC said 5:17PM on 9-16-2007
No perl required:
http://www.versiontracker.com/dyn/moreinfo/macosx/33166
A Work in progress.
Reply