Filed under: How-tos, Software Update, iPhone
HowTo: Restoring your iPhone Notes from a Mac
If your notes got wiped during a recent firmware upgrade, here are some steps that may help you recover them. Warning: Hacking expertise for this exercise is rated "high" to "severe".
- Install Apple Dev tools if they're not already on your computer.
- Copy this to your Mac, name it dbextract, make it executable, and add it to your path somewhere.
- Navigate to ~/Library/Application Support/MobileSync/Backup.
- List all folders chronologically, i.e. ls -lt
- Go into the newest folder and run dbextract against the mdbackup files in that folder: i.e. dbextract *.mdbackup
- Examine the extracted database files. Open them if needed in sqlite3 and .dump their contents. If they have your content, great. If not, go to the next folder in chronological order and repeat.
- Once you find the notes.db file you're looking for, scp or sftp it over to your iPhone and place it into /var/root/Library/Notes.


![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Mike Riley said 9:37AM on 8-22-2007
How can a mortal do this?
Reply
Josh H. said 9:43AM on 8-22-2007
For the faint of heart, just e-mail them to yourself before you update... :-)
www.mntdev.com
Reply
Eddie said 9:47AM on 8-22-2007
Erica, are you suggesting that the upgrade will DEFINITELY wipe out your notes or some reported this while others have not?? I have not upgraded to 1.0.2 because I am waiting to hear about all of these issues. Thanks for the great reporting Erica!!!
Reply
Erica Sadun said 9:48AM on 8-22-2007
My phone got wiped. Other people's phones got wiped. Many people's phones were not wiped. Mileage seems to vary.
Reply
jimmie said 10:00AM on 8-22-2007
I was able to restore using a backup, I got my notes back even though my phone got wiped.
Thanks for creating so many useful apps for us. Any chance of a to do list app? :) No pressure;)
Reply
Patrick McCarron said 10:24AM on 8-22-2007
So Erica, how about restoring Alarm Clock settings, do you see those in the dumps? I haven't looked at all yet.
I got bit hard twice because of it this morning. Our power went out last night around 3-4am (when will it stop raining in IL??) and my regular alarm clock didn't work, and my iPhone is my backup and well has no alarms set anymore since the restore.
Reply
KeynoteKen said 10:16AM on 8-22-2007
No problem with notes here, but, then again, I haven't altered my iPhone in any hacklike way.
Reply
Letty said 10:18AM on 8-22-2007
Erica,
Can one create notes on the MAC and then transfer to Iphone with this method ?
Could be nice to use with email on the iphone if one sends out pretty much the same (long) email to different customers.
Reply
David said 10:22AM on 8-22-2007
You've already got SSH into the phone, why go to this trouble. Before restoring, ssh, grab /var/root/Library/Notes/notes.db restore/update phone, then put the file back. It's a whole lot easier. In fact, I did that for everything from notes, browser bookmarks, stocks, etc. Worked great.
Reply
Johnny Thrash said 10:57AM on 8-22-2007
Don't hack your phone and you won't lose them.
Reply
MacSlut said 5:54PM on 8-28-2007
I don't know why, but for some reason I retained a lot of stuff when I restored for the 1.0.2 upgrade as opposed to the 1.0.1 upgrade. Of course the restore was expected in advance due to hacking, but this time I had kept everything organized for re-hacking. I was up and running as before with all my hacks and apps in about 30 minutes.
David's comment above is awesome. I've added it to my list. In fact, since iTunes doesn't back this stuff up, I'm adding it to my weekly maintenance/backup routine for my Mac.
Reply
Thayne Miller said 2:54PM on 8-22-2007
I found a really good way to make sure that a restore doesn't blow away your backed up stuff.
1) go into iTunes Preferences and DELETE your current iPhone backup.
2) Re-sync the iPhone to create a NEW iPhone backup.
3) (this is the most important part) When you want to update your phone, DO NOT CLICK UPDATE. Instead, click RESTORE. This way, the apple software won't have the unknown error and fritz up. Just do the restore because if you're hacked your phone, you'll have to do that anyway.
Following these instructions, I restored all my texts, notes, settings, etc with no problems, where-as with the 1.0.1 update, I didn't follow these and I lost everything.
Hope that helps.
Reply
ZuDfunck said 4:41PM on 8-22-2007
My notes are all good, ZuD doesn't mess with things he doesn't comprehend. Apple will give us what we need when they have it ready.
Reply
mark said 6:25PM on 8-22-2007
Any idea where photos taken on the iPhone but not transferred to iPhoto are stored as they don't seem to be backed up in iTunes and do get wiped out with restores.
Reply
Reg Muffet said 10:17PM on 8-22-2007
@Mark, from memory there's a "DCIM" folder in the root directory, just like any digital camera would have.
But just plug the iPhone in and launch iPhoto to offload the photos.
Reply
zeb said 2:05PM on 8-24-2007
Do Apple Dev Tools = xcode? (1gb of code, yikes!) http://developer.apple.com/tools/download/
Or what exactly needs to be installed? I need to try this, so will someone please provide a link to the specific app(s)?
Reply
egg said 12:47PM on 8-31-2007
Nice work, thanks!
Reply
Xceler8 said 3:14PM on 11-04-2007
If anyone knows how the Notes function works on the iPhone in comparison to Notes on an iPod where you can load the Notes directory (& Calendar too) up with a set of files (if the iPod is accessible in disk mode) in a hierarchical structure so they can be navigated offline & meaningful content (in my case travel destination info) can be used by folks - (in Calendar - events at a destination can be searched as well), I'd appreciate being pointed to reference material that might help me better use the iPhone platform for my applications & preload notes into the iPhone notes.db file.
Thanks in advance for any help,
Marvin
Reply