How To Recover data from an iPhone backup

My sister lost her iPhone a couple of days back and with that all her contacts, notes and calender entries that she had painstakingly stored on the device.


Her only hope of getting all that important data back was the backup that she had taken a couple of days earlier and she asked me to help her out.

This was my first time dealing with an iPhone backup and I didn’t know where to get started trying to recover data from the backup.

Well, truth be told. The iPhone is not the most open among gadgets. And it isn’t easy to get your data off it. Apple has tried it’s best to hide any iPhone related information from the user’s view. And they have succeeded to an extent, atleast the primary consumers of Apple’s goods don’t really care where (or more importantly, how) the data is stored, as long as Apple provides an application to access it.

In the iPhone’s case, the application is iTunes and the only way to put this data back on to the device is to use iTunes … unless you know where to look for it.

On a computer running windows vista, the data backup is stored in the following location:

C:\Documents and Settings\USERNAME\Application Data\Apple Computer\MobileSync\Backup

Under the backup directory, you will see a directory which looks like a unique ID. This is the directory in which the backup is created, everytime you backup your iPhone using iTunes.

In this directory, you will see a number of files with the *.mdbackup extension.

The .mdbackup files are the actual backups of all the applications and settings of your iPhone. So, the first thing you should be doing is, make a backup of these files :-)

If you use an editor to view these files right now, all you’ll see is garbage, cause these are not text files. They are what Apple calls Binary plists. And to decrypt them, you ideally need a Mac and this utility.

I used the command line version of the utility since I only had console access to a mac and that worked for me.

I first copied all the *.mdbackup files, that I had collected from the iTunes backup folder, to the Mac and ran the following command to zero in on the files that actually had any useful data. I was the most interested in the Contacts data, so that’s what I searched for first.

grep ‘AddressBook’ *.mdbackup

AddressBook is the name of the application which stores, well, address book data on an iPhone. It is only named Contacts in the interface. The actual application name is AddressBook and when I searched for that string in the backup files, I got three files as a result.

I opened the first file using a text editor and it turned out to be the one I was interested in. The word AddressBook is in the beginning of this binary file and it also mentions the database name, where all the data is stored. Yay !

iphone backup

So, now to get to that data base file, we need to use the decoding utility that we downloaded earlier.

decode iphone

So, we’ve got our database file. The decode iphone utility will put it in the following folder structure


Open the database with the following command:

sqlite3 AddressBook.sqlite

and you’ll be dropped to the sqlite prompt. At this point, you need to understand the schema of this database a bit before you can proceed further. Give “.tables” command and you should see the following output.

iphone backup database tables

At this point, I had to use a bit of trial and error to figure out which table holds what data. To view the schema of a particular table you can use the following command.

.schema <table name>

Using this command on the ABPerson table gave me the following result.

iphone schema

There was other information also, but this is basically what I was interested in. So, this particular table was all the information about the a Person, except the phone number. To look for the phone number, I had to look at another table – ABMultiValue. And the two tables are linked through the ROWID and record_id fields in the ABPerson and ABMultiValue tables respectively.

It turns out that the ABMultiValue tables lists all the phone numbers and a quick “select * from ABMultiValue” gave me the answer I was looking for. So, now I finally know where all the data is. To collect all the data in a single place, I used the following SQL query.

select ABPerson.first,ABPerson.last,ABMultiValue.value from ABPerson,ABMultiValue where ABMultiValue.record_id=ABPerson.ROWID

Once I’d confirmed that this was indeed the correct data, I gave the following command on the sqlite prompt

.output backup.txt

That made sqlite put all output into the backup.txt text file rather than the console. And I was set. Ran the above select statement once again and I had all the phone numbers in a nice text file.

How was that for a weekend project, eh ?

In a future post, we’ll talk about taking out the notes and Calender entries from a backup file. The procedure is almost the same, so if you guys can figure it out yourself till then, post the solution in the comments.

253 thoughts on “How To Recover data from an iPhone backup

    1. so my ipod touch was stolen a week or so ago and ALL of my pix were on it… not to mention all my songs.. d/l’d an extractor but need to decrypt them… using windows vista.. please help?!!! i don’t have any pix of my baby girl and it’s really getting to me that i don’t have any of my music!

    2. I have used this third-party tool to backup and recover the contacts from my half-dead iphone to my new one:

      As far as I am concerned, it works on Windows 7 and backs up – restores iphone contacts correctly. I don’t know about music – I think, however that they might also feature that too.

  1. I did find a couple of tools to decrypt the binary plist in windows, but none of them worked for me. That part I had to do on a Mac. The rest is pretty standard stuff. sqlite is available for Windows, so you might want to try that out.

  2. I am the one who lost the Iphone.. but bhaiya… NO CLUE it was sooo freakin hard.. i mean.. i got it only till the time u said u need something in mac.. heheh..

    i stopped there.. i dont have one..


    but thanks tho.. i really needed those contacts.. :)

    1. Except for the first part, of decrypting the .mdbackup file, rest everything can be done on Windows. sqlite tools are available for windows. Actually I did find a script to decrypt the binary plist file in windows also, but for some reason it didn’t work for me, so I used a mac.

  3. Dude I just used iphone backup decoder on a Mac which u have linked here and its just point and click to get the stuff back but it only gives you sqldb’s so from there onwards have to follow your tip. Works great. thanks.

  4. If you have multiple phone numbers it lists it as another contact with the 2nd/3rd number… is there are a way to have it consolidated into one row?


  5. @Bradley: Yes, the multiple phone numbers come as seperate entries but this is just a text file that you’re getting. I don’t think there is anything that can be done about this.

    Look on the brighter side though, you don’t lose any data :-)

  6. Hey man, great article, I’ve used this procedure numerous times to help friends with recovering phone numbers from smashed iPhones, making retraceable backups that wouldn’t restore their entire system software (don’t ask why), etc. Anyway, I just wanted to clarify that last part on exporting to .txt. Is there a specific DBMS that does that? I’m on SQLite Database Browser 1.3 for Mac OS X Leopard and it doesn’t seem to cooperate with that last command, could I just be doing it wrong? If you have any idea what’s going on, would be great to hear it straight from you.
    Thx in advance…

    1. @Vikesh: Is the SQLite database browser a GUI tool ? I’m asking because I didn’t use any GUI tools for this purpose. I opened the database using the sqlite3 command line utility. Just drop into and follow my instructions.

  7. Hmm, this almost works for me, working in terminal in 10.5.5.

    Neither the “.select” nor “,output” seem to perform any function. They just bring up a …> prompt.

    Thanks for this article, BTW… it’s been very helpful.

  8. @sktz: The prompt that you’re getting is because sqlite is expecting you to close the last statement. Did you give the full command as –

    “output backup.txt”

    (Without the quotes)

    If that didn’t work, try adding a semi colon (;) at the end of the statement.

    Or else, try googling for some gui browsers for sqlite3. I have one which works for windows:

    Try this on a windows machine if it works for you.

    1. Hi Sharninder,

      I was extremely interested in this article, thank you for posting your tips on here. I am in the same position, I am using SQLite browser to veiw the backup data (or at least the Contacts tables) and tried your SQL query “select ABPerson.first,ABPerson.last,ABMultiValue.value from ABPerson,ABMultiValue where ABMultiValue.record_id=ABPerson.ROWID
      ” to group the data together. However, ultimately I would like to export the results into another format, ie. txt document or other, but running your SQL statement “.output backup.txt” brought up the error, “no such column: ABPerson.ROWID.output” – not sure what I am doing wrong, but if you have any ideas, I would love to try them out. :)

      1. The output command has to be given on a seperate line. And you have to give the select command after that for the output of select to into the given file.

  9. Sharninder,
    Thank a lot. I appreciate your help. It turns out the issue was, as you suggested, closing with a “;”

    I’m still unable to get it outputted into a text file, but the results do come up in the terminal, and I can just copy-paste them.

    This is extremely helpful. Hats off to you.

  10. Thanks for the great article! I’ve been extracting SMS messages from an IPHONE backup, and am struggling to understand the DATE format. See sample below. I think the actual message date in this example is around 12/30/2009. Any idea of the exact format meaning?

    1230221228 Hello
    1230223075 What up
    1230223125 Txting you on my new phone
    1230223243 Sweet… How was your christmas?
    1230223294 Merry Christmas girl!!! I got a new phone!!

    Thanks much!!
    1230223349 Delightful when can I see you

    1. John,

      I also haven’t been able to figure out the date format although, I admit I haven’t looked too hard. Since, I was mainly concerned with the data, once I had that, I didn’t bother with the dates. I’ll do some more research on this and if I find something interesting, I’ll update this post.

      1. 1230223349 = Thu Dec 25 11:42:29 2008

        this is Coordinated Universal Time (CUT). If you have perl installed:

        perl -e “use Time::Local; print scalar localtime(1230223349);”

        This will convret the time for you.

  11. Those date numbers are “Unix time” i.e. seconds since 1970-01-01T00:00:00Z.
    They range from 2008-12-25T16:07:08Z to 16:42:29 on the same day.
    Unlikely to be December 30, 2009 because (1) that’s in the future (2) one doesn’t wish one’s gf “Merry Christmas” 5 days late and hope to retain the relationship :-)

  12. Yes, I also thought that was Unix time, and converted some sample dates from my phone but couldn’t still get the actual date. I could figure out the date but the year was off by a couple of decades :-) I think I need to look at this again to get a fresh perspective.

  13. Hmm, i’ve opened an sms.db file, but didn’t find there DELETED messages. Only same as on my iphone.

    1. If the messages have been deleted from the phone, I don’t think there is any way to get them back.

  14. @john: “i’ve opened an sms.db file, but didn’t find there DELETED messages. Only same as on my iphone.” Where did you get the sms.db from? opened it with what? what did you do to try to find deleted messages? what is the same as on your iPhone?

    @Sharninder: depends on how they were deleted. I have helped dig out almost all of an address book db which was not backed up and whose contents had been thrown away by syncing it with an empty outlook db. If you can get the sqlite db off the phone and examine it with a hex editor and see lots of names and “c u l8r” etc etc then there is a good chance of dragging out most of the contents into a text file or into another db where you can play with sql and put it all back together.

  15. To John Machin: I need a message that I’ve deleted 24 hours ago by “clear conversation”. I don’t have this message in last itunes backup, so my only chance is a new backup. I extracted OS files via “iPhone Backup Extractor” and found an sms.db file there. Than I’ve opened it via sqlitebrowser-1.3.
    And I didn’t find there any deleted messages, only same messages which are currently available on iPhone. There are missed ID’s in the db table. So I suppose there’s no chance to recover deleted messages. Sorry for my English.

  16. @john: sqlitebrowser makes no pretence of being able to show the remains (if any) of deleted database rows. Of course you would only see the same as you can see via the iPhone. Use a hex editor or a simple text editor or the Unix strings command — anything that does NOT understand sqlite structures and will thus show you ALL of what is in the file. Depending on what else has happened to the database after the sqlite deletion, you have a reasonable chance of seeing the contents of your deleted message there.

  17. @John Machin: Aah ! I get it now. You’re using a hex editor to actually get text out of the db file. That might or might not work depending on how *old* the data is that one wants to recover, but yes that’s a good method to use if one is really desperate :-)

  18. @Sharninder: No, I’m NOT “using a hex editor to actually get text out of the db file”. I’m talking about using a hex editor or somesuch to INSPECT the file to SEE if there is text there that is not visible when you use a program that interprets the file as a SQLite database. In john’s case, his one missing SMS message may be visible in the file, and that’s all he needs. For any quantity of data (like the several hundred contacts covering many columns and several tables that were recovered from the iPhone contacts db) attempting to recover it using a hex editor would be extremely futile.

  19. @John Machin: Yes, I agree this technique is quite good for getting atleast something out of the db file. Recovering the full contents would be quite tedious.

  20. @John Machin: Yeah, the first I did I opened .db file with text edit on mac. The whole text I found was same, nothing hided.

  21. @john: Bad luck, it must have been over-written; SQLite is rather aggressive about using free space instead of extending the file — a very good idea in /normal/ operations.

    @Sharninder: Recovering the full contents (more likely: /near/ full) of a TINY db would be extremely tedious if done with a hex editor. Have you ever looked into the SQLite file format ( ? However it’s not tedious at all when you have a /program/ to do it.

  22. Hi:
    i backed up my sms from my iphone to a “text file” with phoneview (wrong idea)!
    now, i have the 3.0 SW and i want to recover those messages!
    ther is a way to do that??

    thank yo very much!

    1. I haven’t used phone view so I can’t help with that. I don’t think there is a way to directly recover sms messages from a text file to the iphone.

  23. Hi, thanks for ur guide, it really helped!
    Can you make a guide for calendar and text messages and notes? Thanks

    1. Jeobob,

      The last time I tried, I was more interested in the contacts so only worked on getting those. I’ll try write up a guide for recovering text messages and notes too later sometime.

  24. @harninder: I have read your article but I don’t a mac. Could you please tell me which tool did you use on Windows? You said they didn’t work but I would like give them a try.

    I’m so desperate to recover my contacts! really really.

    Thanks for your time.

  25. Hey!

    you don’t necessarily need a mac, any kind of *nix is good and as various people already said, windows is good aswell. Well I was hoping for a gui but then again I finished recovering my data with sqlite3 as you nicely described on a linux centos server, and all is nice now :D yaay!

    Thank you!

    1. @Ciprian: Yes, any windows or unix computer is fine for reading the sqlite files. I used the mac to decode the binary plist file. If that can be done on windows, nothing like it.

  26. i guess you can say i am a noob, but i want to get my contact list to and i dont really know much about how the decoder works.. could you help me alittle?

    1. Just run the decoder with the name of the .mdbackup file and it’ll produce the sqlite files as output.

      decode_backup… MdbackupFileName.mdbackup

  27. I have updated my iphone in my friend’s computer.Now I am unable to get my old contacts telephone no. and notes.Here after I have done syncing several time s in my computer after that.Now can I get that contacts list from my computer again?can I restore contacts from 1 month old backup so I can get full contacts details?

  28. Unless your friend has removed iTunes and the backups on his computer and/or uses another iPhone on his computer also, you should be able connect your iPhone to the other computer and just select restore from backup.

    On your friend’s computer, go to Edit->Preferences and look under the Devices tab. This’ll show you the backups that are still available on the computer. If your backup is still there, you can restore to it. If it’s gone, then you can’d do much about it.

  29. Thanks for the tip. I was to use sqlite3 command line utility in windows to access my contacts data from backup to a text file, following your steps above. The instructions were very clear once I read them :))

  30. This is an amazing tutorial, thank you so much for sharing! I just have one questions – I am using SQlite browse & I am able to execute the query & see the contacts nicely but the problem is how do I export it? When I click on export it is only giving me the option of exporting the “AB Person” or “AB multi value” but I need to have it export the combination just the way your query is.

    1. Pamela,

      My article is useful for those who want to understand some of the inner workings of iPhone’s backup files. If you’re an end user only interested in getting your data out, I’d suggest that you take a look at the iPhone Backup Extractor application from reincubate.

      If you can’t get it to work, let me know and I’ll try and help you.

  31. Hey i’ve been looking all over for a solution to my creativity…I was @ a friend’s house out of town (windows Vista) and decided to update my iphone software ( i know…i should’ve known better!!!). Any way when i plugged the phone to update the software, it automatically backed up it. In the process of synching it failed and left my phone in recovery mode.
    I had a previous backup on my Mac at home and had to restore my phone with that one meanwhile because it was on recovery mode and i need a functioning phone.
    I know where the backup is stored on a vista pc, the question is if he can send it to me by email, cd, etc and can i copy it onto my MAC (library/app support/mobilesync/backup) and then restore my phone with it????
    I don’t want to loose 1 year since my last backup . Please help…..

    1. Hi Alex,

      I’ve not really tried this but it might just work. The only way for you to find out is to actually try copying the backup to the backups folder and see if iTunes recognizes it. You’ve got nothing to loose. If iTunes recognizes the backup then it’ll work, or else you’ll have to get the data out of the files manually as described in my post.

      Let me know if it works or not.

    2. Yes, you can use a backup file from iTunes on any other PC: the iPhone Backup Extractor ( will be able to read it on Mac or Windows.

  32. I rescued the mysterious loss of some calendar appointments using the following steps:
    (From an iPhone running OS 3.1.2)

    * Ran iPhoneBackupExtractor on my iTunes backup file
    * Extracted Library/Calendar/Calendar.sqlitedb
    * Opened using free Firefox Addon SQL Lite Manager
    * Browsed the Event Table
    * Selected the records I wanted to recover, right-clicked and copied as CSV (Excel compatible)
    * Pasted into MS Excel

    Recovering the original dates and times was quite confusing. I thought the times should have been seconds since 1/1/1970, but it seems mine were seconds since 1/1/2001. So I created a new column with this formula:
    =”1/1/2001″ + F1/60/60/24 + 11/24

    This assumes your number is in cell F1 (e.g. 281577600). The middle part converts the seconds to days (required for Excel) and the last bit adds 11 hours (because I’m in Eastern Australia timezone). This should give you the original dates and times back. You can then import those dates into Outlook, or your other calendar app.

    Hope that helps someone.


    1. I know it’s been a while since you posted this but wanted to say thanks. I had a hard time finding the date conversion formula. Yours works perfectly!

    2. The reason is that this is not an EPOCH time it is what Apple calls Mac Absolute Time. The iPhone backups have both EPOCH time and Mac Absolute Time stamps in its files.

  33. Hello!

    Great tutorial!
    I was wondering…
    Since i’m not the only one with this problem, maybe you could help a lot of people with that.

    I have an iPhone 3GS with the new bootrom (tethered jailbreak) I rebooted it and now i can’t get it back to work with blackra1n. So im stuck with either an jailbreaked and unlocked 3.1.2 or i upgrade to 3.1.3 and wait what will come…

    Anyway! I do have an backup of my entire phone. And since i didn’t backup my ECID SHSH i was wondering, if it’s possible to get those informations out of the backup?

    My second question…

    Is it possible to access the phone while it is in recovery mode? I want to get in and delete some files i installed, which may be the cause of my problem.

    Thanks in advance for your help!

    1. Sorry for the delayed response. I’ve been a bit busy in the offline world.

      The short answer to both your questions is that I don’t know the answers. The long answer is that as far as I know the SHSH hash is only required to unlock the baseband. If you already have a backup of the data, that should be in regular sqlite and you should be able to use this guide to get your data out. There is anyway no harm in trying, right ? So try out and let us know how it goes.

      The second question is the more difficult one since I don’t have an iPhone 3GS to actually try this scenario out, but if your phone is in recovery mode, I don’t think you can get in it. Getting access to the filesystem requires jailbreaking and the full iPhone OS to be running which it isn’t in your case.

  34. i have apple iphone but i make mistack i make ereae all from my phone now its come blank
    i wont some thing for my iphone

    1. I’m sorry but it is difficult to understand what you’ve written. From what I understand, you have erased everything from your iPhone and want some of the data back. Am I right ?

      If you have an older itunes backup and you follow this guide, you might be able to recover some of your data.

  35. Hi all,

    i have lost my 900 contacts by clicking on erase contact icon on my phone. its a stupid application which didnt even asked before deleting all my contacts. it was there in the phone already as i had bought the phone from a friend. is there any way i can get all those contacts back. i’m using a windows machine with itunes 9.1 i have alraedy done a restore using itunes but it was of no good. plz help.

    1. If you have the backup files then you might be able to get some of your contacts back using the instructions in this guide, but only if you’d made a backup using iTunes before deleting the contacts. If you didn’t backup earleir, I’m afraid I can’t help you.

  36. Enormously helpful to those of us who have lost or destroyed our iPhone in some way :/

    I was able to get this to work under Windows Vista with a few minor modifications. You don’t really need to use the Python script, but you will need to grab the sqlite3 binary from somewhere (preferably the sqlite website.) And Cygwin is helpful but not required.

    You basically want to look for the encrypted files in C:\Users\UserName\AppData\Roaming\Apple Computer\MobileSync\Backup\. You want to search/grep for the file that contains the AddressBook.sqlitedbS1 line, but under Vista at least, there will be two files: a .mdinfo and a .mddata file that have the same name, as opposed to the one .mdbackup file. The AddressBook.sqllitedbS1 string will be in the .mdinfo file where the corresponding .mddata file is actually the sqlite database. You can pass this file (preferably a backup or copy) to sqlite3.exe and then run the same output and SELECT statement that you do.

  37. Use the following SQL to get rid of duplicates.

    select distinct ABPerson.first,ABPerson.last,ABMultiValue.value from ABPerson,ABMultiValue where ABMultiValue.record_id=ABPerson.ROWID

    Great article! Using SQL Browser + iphonebackup extractor to get the sql db off a recovered backed.

  38. I know it’s been a while since you created the original entry, but you don’t actually have to play around with the Terminal even if you aren’t accessing the files on the computer where it was backed up.

    If you just place the backup folder where it would be if you had backed it up on your Mac the software reads it just fine. Though it’s still full of SQL-y goodness.

  39. on win 7 the folder should be
    but i did not yet tried to recovery the data

  40. I had to do a backup and then restore my iphone. They had me load it as a new phone because they had originally thought it was a corrupt file on the phone causing problems. Eventually, I was given a new iphone. My favorite game, Tap Tap Revenge 2, was wiped out. All the songs that I loved were no longer in the app. I’m sure it’s in the backup file somewhere. Any chance you can tell me how to find it and put it back on my iphone the way it was??? It’s really the only app I need to do this for, and I have so many more on this new phone that I would rather not restore it to the old one and risk losing everything I have now. I do have a mac if that helps. Thanks!!!

  41. Read mostly all the comments… Would appreciate any help possible…

    I have a 3gs (bought in dec09). I have never synced my phone to my itunes and now my phone has crashed. Apple store tells me that I have to restore and will lose everything.. Will following the above mentioned by Sharninder help me recover my contacts? Thanks in advance

    best article yet that I have found in 3 days searching… i hope this helps me..

    1. Since, you have never synced with iTunes, you won’t have an older backup but ideally when you restore through iTunes, the software first creates a backup of the phone and then installs the firmware. BUT, since your phone has crashed, I’m not sure how iTunes will behave in your case. If it does take a backup, you can get your contacts back following these instructions. If it doesn’t, well, you were going to lose everything on the phone anyway in the first place.

    2. Lex ! You and I must be the only two people in the world who have not sync’d our iPhone’s with iTunes ! I use Spotify and stupidly formatted my laptop so have not been syncing my iPhone with iTunes.

      My iPhone has just died and I can’t switch it on BUT when I plug it in the laptop makes a noise and asks me to install iTunes. I’ve plugged it in and installed iTunes and it’s asking me to try a restore. I’ve read this will delete your data BUT also read Sharninder’s reply that it should try a backup first…

      I’ve just signed in on iTunes so a tempted to give it a go but SO don’t want to lose all my pictures, what did you do in the end ?

      Also Sharninder, anything I can do ? Obviously no iTunes backups or data on laptops, but I do run an IT company so am IT literate, only thing I can thing is something must need to plug into the iPhone to get into the actual mobile device’s file system… But could be a lot of work plus special hardware required…

      Thanks guys in advance for any help

  42. I had success with this just now using the trial version of “Iphone Backup Extractor” extracting the “AddressBook.sqlitedb” file from my “Library” folder then downloading/installing the Windows version of sqlite3 ( From there just playing around with the above. Thanks! My iphone isn’t cooperating with me currently and this saved me a lot of heartache. :D

  43. The thing is I’m going truly crazy at this second. Yesterday idiot me, was in a hurry and when I connected my iphone 3G with my itunes, which i haven’t done in the last 4 months.. again idiot me, and the update to software to 4.0.1 just popped up on the screen, and I just said yeah, whatever and clicked go on man! Really, I should be out of my mind because I always check those things and try to back up it before any update because of the things that I’m afraid might happen. And to my idiot luck it did happen… :( It said while it was updating that it was backing up the phone. So I went to sleep and left it open so that it can download on its own, and in the morning I just get it off the itunes and went to work. Then remembered to check my messages just to see an empty page. Shock! Then I came back home hoping I can restore my phone from the backup it had yesterday, but again to my luck, the idiot itunes hadn’t backed it up yesterday, I mean when I said back up today it just backed up to the four months before backup. In other words,I want my messages, and contacts back!!!Pleaaseee helpp, they were soo important to me. Please I just couldn’t understand what to do, helppp :( Please?

    1. Joey, you can try and check the iTunes backup folder to see if iTunes did actually make a backup of your device or not. Other than that, I’m not sure if I can be of any help to you. If the iTunes backup wasn’t made at all for some reason, then I don’t think you can recover your data, considering that you’ve already flashed a new firmware.

  44. i’m in the midst of a situation that seems similar but i guess i don’t know macs well enough to recuperate my data. basically my ipod died, but i was able to sync it first. i plugged the new one in, and it insisted on updating the itunes before it synched with my data, and then it would *not* properly sync with my previously stored data on the computer. instead, it created a separate persona. so while i gained all my applications, i did not regain all the passwords for them. i did get my contacts back. unfortunately the one most important thing i need is some info i wrote in notes.

    i did what you said, i found the mobile sync backup from the correct day, and using the utility (this is all on a mac) i bring up that data and i can put it into a folder on my stupid apple desktop. but it does not have any contacts/notes — only applications that i put on the ipod. is the notes data still there somewhere? i recently restored a bunch of data off my ancient ipod onto a pc, but obviously macs are not as easy to work with : (

    btw itunes does give me the option to restore and sync it with the old version of my ipod contents, but then it gives an error message and although it’s synching, it does not come up with the stuff i saved on it. it syncs as though it were brand new and just retrieving the apps off the computer.

    the apple store was nasty, and unhelpful on this issue, of course. and they gloated about how my warranty ran out friday. (classic!)

  45. Sharminder, thanks for such a great site! Quick question, I have an iPhone 3GS OS 4.0.1 that has never been jailbroken (and apparently can’t be at this moment). I want to delete some of the autofill email address entries in my mail program (my phone pulls email from my gmail account) but nothing works to do this. I used the iPhoneBackupExtractor to download the AddressBook.sqlitedb file and manually deleted the entries using Visual SQLite.

    My question now is do you know how I replace the original file with my modified file?

    1. Short answer: I don’t know.
      Long answer: You might be able to re-encode the Addressbook and put it back at the same location “on the iPhone” but that’s only possible if it’s jailbroken. Even then I don’t think those autofill entries come from the address book, I think the mail client keeps them in a separate db of it’s own, which I haven’t really explored.

  46. Hello everybody,
    please im really in need to know what happened,
    i just was on itouns trying to understanding it well then i realzed that i lost all applications on my iphone, i dont know why, i did not remove them , strange but now i just want to know if there is any ways how to find them on the computer or maybe if there is a softwar which do this operation to get them back again, alot of applications i’ve lost :( hellllllp

    i have windows vista, when i connect iphone to computer and i go on itunes i click on (sync apps) and then show up (( are you sure yo uwant to sync applications? all existing applications and their data on the iphone will be removed)) should i chosse (dont sync applications)? or i may try that softwars to try to get back my old applications on iphone and its not just a free apps , its paid ones too. too bad :((

    plzzz im still new on iphone world, and just start using it a few days ago,
    thnak youuu
    i’ll be waiting the answers!!

  47. Sharninder: For last 2 years am using iphone recently i bought 3gs and before that i was using 3g. i had a back for 3g in my itunes when i connected my new 3gs i was unable to find the old back. so all my contacts sms notes everything got vanished and am trying to locate my old back. where did it go. as in i havent deleted it also. it just disappeard. so please help me out to reach back to my old back up. am using window 7

    1. Try following the instructions in this post and you should be able to recover your data. If you have a problem or get stuck somewhere, let me know and I’ll try my best to help you out.

  48. My phone (3GS) recently got stolen so I had to revert back to my old 3G. I’ve been trying for ages to get the data from my 3GS phone (contacts, sms etc) onto this but can’t figure out how. In the MobileSync file, there are backups from the 25/08/10 which would be ideal but on itunes, when I right click on the device and try to restore a back up, this one doesnt come up. When I go to iTunes-preferences and click on devices, the 25/08/10 backup comes up but the only option there is to delete it. Again, iphone backup extractor doesnt seem to be able to locate this back up. It’s very frustrating as the old backup i’ve had to use is from march 2010. Would be very grateful if you could help me out.

  49. My phone (3GS) recently got stolen so I had to revert back to my old 3G. I’ve been trying for ages to get the data from my 3GS phone (contacts, sms etc) onto this but can’t figure out how. In the MobileSync file, there are backups from the 25/08/10 which would be ideal but on itunes, when I right click on the device and try to restore a back up, this one doesnt come up. When I go to iTunes-preferences and click on devices, the 25/08/10 backup comes up but the only option there is to delete it. Again, iphone backup extractor doesnt seem to be able to locate this back up. It’s very frustrating as the old backup i’ve had to use is from march 2010. Would be very grateful if you could help me out.

  50. Phew, finally got it working. Just wanted to say thanks. I wouldn’t have been able to finish without the additional help for the comments. I also had an issue with closing my select command with a semicolon. Couldn’t you add that into the original instructions? I assume it wouldn’t hurt those who (for whatever reason) didn’t need it in the first place. Just a redundant command close. Also, I found out the hard way that my file was an “sqlitedb” file extension, rather than an “sqlite” extension you mention in your line “sqlite3 AddressBook.sqlite” to open the database. I’m not sure if this is a common issue or a result of a newer version of iTunes or what.

    Anyway, you’re a lifesaver. Lost everything when I downgraded my 3G back to iOS3 after getting fed up with the atrocious iOS4 performance. Thanks again.

    1. iPhone stolen, lost or broken ? You need to read and display any iTunes backup ? Try iTwin from my website. That should do the trick … … Give it a try on your PC or via Parallels even on your Mac and you will be amazed ! Now compatible with iOS4. Works with any iPhone (2G – 4), all iPod Touch and the iPad.
      Rgds. SittingDuck

  51. I’m surprised that just restoring from the existing backup (select iPhone icon in iTunes sidebar, Control-click, choose Restore from Backup) didn’t work. After restoring, you have to sync. That should put the contacts back on the iPhone.

  52. Hey,

    Does anyone know the files that i would need to only restore the Contacts and SMS history to my phone? I’ve tried doing this various times, doing it step-by-step, and haven’t had any progress in finding the files. Can anyone help me?

    Thanks in advance,

    1. You can’t “restore” numbers to your phone. All you can do is get them in a file and then manually feed them later. Hey, atleast you don’t lose your data :-)

  53. Hi there. Thank you for this post I think I am nearly there but am running into one problem. For many of my contacts I have several phone numbers and often two emails. These are all displayed as simply “value” and I am wondering if there is any way to keep the associated headers for easier and more accurate import. I’m using RazorSQL to view the data. Thanks in advance for any advice. ~Jessi

  54. Jean, If you’re using OS 4 or later, the files are:

    3d0d7e5fb2ce288813306e4d4636395e047a3d28 – for SMS messages
    31bb7ba8914766d4ba40d6dfb6113c8b614be442 – for contacts

    For calendar entries, notes, call histories or older OS versions, see here:

    As Sharminder says, getting your contacts back onto your phone isn’t easy, but a tool like the iPhone Backup Extractor will let you save the contacts from your backup into a CSV or VCard file which you can then import into Outlook, Gmail, etc., then sync to your phone.

    There are a couple of guides that might help here…

    Extracting contacts to CSV or VCard:

    CSV to Outlook:

    VCard to Gmail:

    Unfortunately, the SMS history is trickier.

    1. Hey,
      I found the files on my back up, and yes i am using iOS4 (thanks for the correct names, didn’t even know they changed with every new release of the OS lol). I’ll look further into actually working with this when i get home later, thanks to all who helped.

  55. Hello,

    I have an iphone 3g that was updated to ios 4.0.1. I succeeded in downgrading to 3.1.2 (and now the phone is much faster, thank you!). Because the last backup was made on 4.0.1, I cannot restore from this backup as the phone is now on ios 3.1.2.

    I was able to extract the backup with iPhone Backup Extractor and using DiskAid attempted to swap the various files (address book, calendar, notes, sms, voicemail). I was successful only for sms history. As for notes, the extracted file was in “.sqlite” extension … while the file on the iPhone was in “.db” extension. I tried various scenarios but nothing worked (for instance, I tried changing .sqlite to .db; I also tried just transferring the .sqlite file) but nothing worked.

    As for the others (address book and calendar), I swapped the various files as instructed in the DiskAid manual, but the phone showed nothing in the Contacts and in the Calendar. Oh, the first time I tried opening Contacts or Calendar after doing the swap, there was the Apple logo with the bar underneath it for 1-2 seconds before getting in the Contacts or Calendar …

    Can anyone help?


  56. Hi Diz,

    There are a couple of tools out there called iPhone Backup Extractor. I help look after the one at this site:

    Do give it a try if you haven’t already. If you run into any problems, hit the “Contact” link at the bottom of our page and I’ll see what I can do to help you more directly.

    All the best,


  57. i had to restore my iphone the other day on a computer i don’t usually use and lost ALL my data!!! when i got my home computer working again, my phone synced with itunes but when i search mobilesyncbrowser the only “syncs” that show are after the restore….which i suppose makes sense but i hoping to find my pics somewhere! will itunes will only save the last sync on your computer? is there anyway to retrieve this data? contacts and pics primarily….

  58. @SittingDuck That looks like an awesome app only I don’t understand the language. German is not one of my dialects.

    1. Thanks Brian.

      You can easily change the language on the tab ‘Einstellungen’ and then ‘Sprache’ in case iTwin starts in German. Shouldn’t be a problem. Just try it. iTwin is under constant development. If you like, then try the latest beta version aswell. You will find it under
      Rgds. SittingDuck

  59. Hi,
    I have a Mac, OSX Tiger (10.4.11), so don’t have the Intel chip and can’t run the iPhone Backup Extractor program. I downloaded the program you suggested (decode iphone backup), but don’t quite know what to do when the dialog window opens. I don’t have files with the name .mdbackup, but do have ones with the long names similar to what Matt writes about above (Sept. 17, 2010). Do you have suggestions on how to decode them?
    Thanks in advance,

    1. The easiest thing to do would be to take these files to a friend who has an intel Mac and decode them there. I don’t have a newer iPhone so can’t really say. I’m sure these are also some kind of encrypted sqlite files, you just have to figure out the encryption being used.

  60. Hello!

    Does anyone have experience with restoring data on 4.1 but backed up with 3.1.2 ?
    When I start “restor from backup”, I always get the message “iTunes could not restore the iPhone ****** because the backup session failed.”.
    Downloaded software iTwin and it extracted all data from backup directory – so I know backup did fine.


    1. Try the latest beta-version of iTwin and export all your contacts as a big vCard. Then send that file to yourself and open it on your iPhone. You will then have the option to import a single or all of your contacts into your adressbook. Pictures are included if you like. That how I setup my fresh iPhone (c:
      Rgds … SittingDuck

  61. Thank you very very very much!

    The DBs have changed a little bit (now you’ve got everything separated in two files: .mdinfo, which simply says what is in the DB, and .mddata, which is the actual data file), but your query worked like a charm. I then just exported that to a csv, merged dupes, and was saved!

    Great post.

  62. Sharninder, How much would you charge if I could send the file over to be decoded? I just don’t have time and don’t have Mac access. Thanks!

  63. Hi Sharninder

    I jailbreaked my iphone a while ago…until yesterday i did my first update.
    I connected my phone to itune and obvously it ask to update a new version of itune i clicked yes but then i got an error. The new itune got installed but it never asked to do a back up of my iphone.
    So yes i lost EVERYTHING…all my notes,contacts…wothout doing a back there any way for me to get my stuff back.I need it soooooo badly and since yesterdau i’ve been looking everywhere to find a solution
    Please help me
    Thank youuuuuuuuu

  64. Great article, technical and well written, yet you don’t need to be a hacker to do it! I was curious if you’ve had success manually dropping the database files back on a phone as a method of restoring. Whenever I restore my phone from backup it goes into an endless loop, the only way to recover from which is to knock the phone into DFU mode and restore with iTunes. Not installing PreferenceLoader after jb will avoid the problem, but need both my contacts, and apps whose dependencies include PreferenceLoader. Thanks in advance Ninja!

    (iPhone 4 at 4.1 downgraded from 4.2 with 3.10.01 baseband and jailbroken with limerain)

    1. I haven’t tried dropping backup files back to the iphone directly, but knowing Apple, I don’t think it’d be that easy. I’m sure you’d have to do some more processing :)

      1. hi, i badly need your help. i know you are busy and i know you are super good at computers. I just need your help in tracking my lost iPHone. I know it’s possible for you..

        Your admirer

    2. I recently bought a PC program called iTwin from here:
      Did an export of all contacts as one vCard file and mailed this file to me. Then your iPhone does the import of all your contacts including contact pictures. Did the same with SMS as a HTML … WORKED !

  65. Hi Sharninder

    Would you be able to decode an encrypted backup SMS file? The backupextracter can’t do that.

    I don’t have a mac. Would you be able to decode the file if I email it to you?


  66. Thanks ninja and ninja’s commentors. I actually found a solution browsing through the comments!!! I will export to CSV, import to gmail, and sync with the phone! Now to figure out how to stop getting notified everytime someone comments on this article!

  67. I had to share this with someone. I wanted my notes that I guess I didn’t have syncing. Did a little crazy work but finally figured out how to do it and read them. First I used iPhone Backup Extractor ( to find the backup. I selected “read backups”, then “iOS files”. I extracted those files and found the notes folder in the library folder. I then used Base ( to read notes.sqlite – the trial/free version was good enough. Then, using Base, I exported sqlite_master. Then I used Text Wrangler to read the .sql file that Base exported. All of my notes were in that file. It was formatted weird but I only needed a little text from one notes so it was exactly what I needed. I’m freaking amazed.

  68. Great article! Thanks for the tip!
    This might be out of topic but what about photos?
    Is there a way to recover it from a backup?

  69. btw, I prefer to use a longer query:
    select ABPerson.first,ABPerson.last,ABMultiValue.value from ABPerson,ABMultiValue where ABMultiValue.record_id=ABPerson.ROWID and ABMultiValue.value “” order by ABPerson.first

  70. hi

    i have iphone 3G, 8GB one. i connected to itune for first time and it seems i have lost some of my contacts and pictures which are very important to me. do you know how i can get them back? is there any software or anything that can retrieve the data on iphone and get them back as you can do in pc hard drives? thanks.

  71. Ahoy there PC type intelligent people! Heres the thing…..

    I have the backup on my PC of my Iphone and I want to be able to read it all clearly in some sort of browser / program. I want to be able to export the messages, pics and vids so they can be used.

    Can someone please tell me, in clear non tech jargon, how this can be achieved, if at all?



  72. I give up! I’ve been trying to figure this out for over an hour and I cant get it to work. I get to the point where I put in the “.tables” command but I get no response. Obviously, Im not a very technical person. SHARNINDER, how much would you charge to do this for me? If you have Paypal, I can transfer the money. Just need your Paypal email. I need my contacts because my iPhone was stolen. Please email me and let me know if you can do it, and what I would need to do. Thanks.

  73. Mate, looks like you’ve been of great help to many here. Kudos to that:)
    I have an iphone 4 and jailbroke it. something went wrong and I lost ALL data:( I want a backup of my contacts and text messages (if possible) REAL bad! Thing is I dont have a Mac.. So if i could maybe pay you something, would you be able to do it for me? Please please help?:)

    1. I meant to reply to your message in case you have reply notification enabled.:


      I can try my best to help you restore your backup. I’ll try the method I posted above. I’m not going to make you pay just because that’s a little fishy for someone to ask you to send them they’re backups and fork over some cash, especially at the same time. If I’m successful maybe you can “tip” me via paypal or something. Not a huge deal.
      Send the backup file to:

    2. For recovering iTunes backups on a PC, try using the iPhone Backup Extractor at:

      There is a free version that shows you what you have in your backups and you can recover your contacts etc via the ‘Expert mode’ and SQLite manager or register the app for full access to the easy to use front-end.

      There is also plenty of help and tutorials that complement this post’s great info if your a little stuck.

  74. Sravan,

    I can try my best to help you restore your backup. I’ll try the method I posted above. I’m not going to make you pay just because that’s a little fishy for someone to ask you to send them they’re backups and fork over some cash, especially at the same time. If I’m successful maybe you can “tip” me via paypal or something. Not a huge deal.

    Send the backup file to:

  75. So a baby deleted a calendar app with addresses and other info. I stupidly quickly redownloaded it only to find out that all the info is gone. Then I hoped by re-syncing my phone that the info would go back on the app. It didn’t. All the info is erased. Is there any way I can get the info back I’m not very computer savy and I’ll go to the mac store if I knew they can help. Do you have any suggestions? This is a horrible app to lose.

  76. Hey Shaminder,

    You seem to know what you are talking about. I need this in real simple terms:

    I have restored my phone and then plugged it in again at which point it made a back up.
    It now does not give me the option to restore from my previous back up.
    How do i trick it into letting me select my previous back up?

    Thanks in advance!!!

  77. Kirsty,

    I just had to do this and the only way I could make it work was restoring the backup folder from my time machine backup a few days earlier. Do you have backups?

  78. I have not got a recent backup that I have done, however the .mddata and .minfo files I have in the iTunes folder are dated prior to me wiping everything, how do I get my phone to use these? They are time stamped 1732 and iTunes is saying last back up it has is 1811.

  79. i have pc with windows 7
    any idea how i can recover my notes.
    i updated it without manually backing up. and it said it was backing up iphone…

  80. Kirsty, i had the EXACT same problem today!!

    when i plugged in my new phone, the NEW sync over-rided the old backup which i wanted to restore before i had a chance to. I don’t care abt anything else in the phone except my pictures of my babies :((((((

    Sharninder + everyone else, pls help?

    I have Windows and am as tech-dummy as they come. Dont even know what Sqlite is.

    1. Kirst and Minty,

      The only way to restore backups directly to the iPhone is using iTunes and if iTunes doesn’t recognize the older backups, I’m afraid you can’t do much. As far as I remember, iTunes has an option to delete a backup. It’s hidden somewhere in the preferences window. See, if you can delete the latest backup and then iTunes should revert to the one before that. Right click your iphone in itunes and select the restore option.

  81. Minty,

    That’s really not possible. If you got a new phone and plugged it in, it asks you if you want to set up as a new phone or restore from backup. If you just got the phone it won’t just start backing up and override your old one. Plus, more than likely they’re named differently. Did I miss something here?

  82. Thanks for ur replies guys. When I plugged in the new phone, it asked me to register n I cleverly named it the same name as the old phone thinking then that it wd auto recover from the old sync. I didnt see anything asking me to choose Then I clicked sync. Brilliant. Now I only see one backup which is of the new phone.

    If I delete backup, er… Wd it delete the newest backup then there’d be no backup at all left?

    U mean I can’t follow ur steps above to recover my photos?

    Thx again!!!

  83. I hv a windows on the pc where i synced. but my sis has a Mac if it works better on mac and there’s a way to trfr the apple backup files from that apple folder to the Mac?

  84. I stumbled across this write up and it seems to be one of the most positive looking methods I have found for retrieving lost data on an iPhone 3G. Only problem is that I am not very “technically capable”. Would be very grateful if someone would be willing to help me get thru these steps. I am working on a Mac.
    Thanks in advance.

  85. When I open the SMS file (starts with 3dod) from the backup in a word .doc or in .rtf I can see most of the texts (along with jibberish), but when I open it in SQL, there are certain texts that do not show up.

    Is there any way to actually view them without all the jibberish? I am assuming they were deleted before the backup was made bit are just hanging around inside the phone.

    I’m using windows XP

    Thank you so much.

  86. you just saved me i dont know how many hours…
    just put the command you’d tweaked into sqlite db browser 2… piece of cake.

  87. I lost my back up because iTunes tells me the files are corrupted but I found the backup files in:

    C:\Documents and Settings\USERNAME\Application Data\Apple Computer\MobileSync\Backup.

    However, the files do not have any *.mdbackup extension and just have hexadecimal names and their file type is “File”. Is it because I am using a windows PC?

    I tried opening one of the files with notepad and it just shows some weird characters and spaces

    Is there anyway for me to recover any information from these files? such as contacts etc..


  88. Hiya, I am very confused. I lost my iphone, I have backed it up many times on my mac. I just want my contacts back how can I get them?

    Thanks! :)

  89. Excuse my English. How can we recover deleted text messages from the iPhone 3g without having made prior to saving as. Is this possible? I understand not.

  90. wife synced her iphone 3gs in itunes and it ate all her contacts and loaded her phone with my iphone 3gs contacts. we use the same computer running windows xp. is there a way to recover her contacts?

  91. Hi!

    I have been able to access all of my contacts, except that there are about 10-15 extra numbers that have no names associated with them. The problem comes from the fact the numbers i need are part of the unlabeled list. Is there anyway to find out what the names that were originally posted with the numbers are? I suppose i could just call like 15 different people, but i’m trying to avoid that :)

  92. Here is a query to flatten the relational data into a single table that can be exported as a text file (CSV, Tab, etc…)

    select p.first, p.last, p.middle, p.Organization, p.Department, p.note, p.JobTitle, p.Prefix, d1.value as mobile, d2.value as Home, d3.value as Work, d4.value as WorkFAX, d5.value as Other, d6.value as Main, d7.value as “Home email”, d8.value as “Work email”, a1.value as Street,a2.value as State,a3.value as CountryCode,a4.value as City,a5.value as Country,a6.value as “Zip/Postal” from abperson p
    left outer join ABMultiValue d1 on d1.record_id=p.ROWID and d1.label=1
    left outer join ABMultiValue d2 on d2.record_id=p.ROWID and d2.label=2 and
    left outer join ABMultiValue d3 on d3.record_id=p.ROWID and d3.label=3 and
    left outer join ABMultiValue d4 on d4.record_id=p.ROWID and d4.label=4
    left outer join ABMultiValue d5 on d5.record_id=p.ROWID and d5.label=5
    left outer join ABMultiValue d6 on d6.record_id=p.ROWID and d6.label=6
    left outer join ABMultiValue d7 on d7.record_id=p.ROWID and d7.label=2 and
    left outer join ABMultiValue d8 on d8.record_id=p.ROWID and d8.label=3 and
    left outer join ABMultiValueEntry a1 on a1.parent_id=p.ROWID and a1.key=1
    left outer join ABMultiValueEntry a2 on a2.parent_id=p.ROWID and a2.key=2
    left outer join ABMultiValueEntry a3 on a3.parent_id=p.ROWID and a3.key=3
    left outer join ABMultiValueEntry a4 on a4.parent_id=p.ROWID and a4.key=4
    left outer join ABMultiValueEntry a5 on a5.parent_id=p.ROWID and a5.key=5
    left outer join ABMultiValueEntry a6 on a6.parent_id=p.ROWID and a6.key=6;

    Just copy and paste this into your SQLite Query designer and run.

  93. A couple of weeks ago I purchased the decipher text message program and it works great. The link is
    I was able to recover all my old iPhone sms photos and messages from my back up files that I thought were lost. Phew. ; ) My girlfriend was so happy since a few of the images were from when we first met.

  94. I synced my iPhone and lost all of my notes!!! How or can I recover them. The only back up files listed in iTunes were the ones I did after losing my notes and trying to recover them. I deleted them like you suggested, hoping it would revert back to an old back-up but nothing is there now. Back-up files is blank. I am not using a Mac or Vista that was mentioned in this information.

    1. Which operating system are you using ? iTunes may still have some backups that it isn’t displaying in the list. But, if all backups are actually gone, then I’m afraid, I don’t really have a way for you to recover your notes. I’d suggest that you start using a cloud syncing service such as simplenote for your notes. I use it and it’s awesome

      1. Sharminder,

        I don’t have access to a mac. Is there any way to extract address book from the backup files taken using itunes. I am trying to get the contacts to another iphone and I don’t want to do a complete restore since I don’t want to upgrade the IOS.

        Biju Joseph

  95. Heyy;

    I had a 3G iPhone which was stolen and I recovered the data from iTunes (windows7) but they didn’t have the .mdbackup extension… yet I can grep it for AddressBook. But the extractor does not work, (just says no text to output), can you point me towards what might be wrong?

  96. Awesome work!!!

    The only step didnt work for me was:

    sqlite3 AddressBook.sqlite

    I had to instead use the following command and rest worked like charm.
    sqlite3 AddressBook.sqlitedb

    Thanks a ton.

  97. I dont want the settings, just the contacts! Is there a way i can only restore the contacts? (I dont know if i used outlook, adress book, etc)

  98. I would just like to say, if I was gay – I would finger you.

    I’m definitely no tech head but through your clear explanation I was able to find a work around. I copied my backup data, and extracted it using iPhone Backup Extractor here: … at this stage I became very confused and stuck for a couple of days as I am not familiar with SQL, I thought it was a supermarket? Anyway, I then downloaded SQLite database browser here: … When the window opened, i used your SQL query: select ABPerson.first,ABPerson.last,ABMultiValue.value from ABPerson,ABMultiValue where ABMultiValue.record_id=ABPerson.ROWID … And voila, I got my contacts up on screen. I am using a mac running Snow Leopard and both those apps are supported. Only thing is – I dont know how to save a text version, but this is a VERY minor issue.

    I very, very much appreciate the time you have put in to this. Thanks very, very much… and watch out for the finger!

    Ps. No idea if someone has posted the same above, but its always worth posting again.

  99. Help, please!!!!! My iPhone 4 got broke where everything popped off. I can’t get it to come on. I was not aware of the iTunes backup. It had 2,500 pictures, everything from my daughters first year of kindergarten, our family vacation to Disney, Christmas ( which was my sons first) and also almost his whole first year. I’m very sad over this. There’s so many personal memories in those pictures. Can anyone help me, please!

  100. My daughter’s iphone 4 was snatched from her while in Jamaica on vacation. She had some files that were not backed up on itunes, is there any possible way to retrieve the photos, files … with the IMEI #

  101. Hello everybody.Here is the thing : I lost my contacts due to a bad manipulation with iTunes and of course want to retrieve them but the problem is that I don’t understand where you go to select all the data needed. I got ABperson, etc but have 1614 pages on word. I downloaded Sqlite and I tried pasting some files but every time I got an error message. Can anyone help me please in telling me how I can select the right things in order to paste them after ?

  102. Hi Sharninder Thank you for sharing this information and helping so many people!
    Can you help me?
    I was backing up my girlfriends iphone 4 and accidentally I clicked on the sync contacts with google which deleted all her contacts on the phone. I did have a csv of old contacts which I imported into google and then synced with the iphone which backed up those contacts.
    These are no good and she need the original contacts.
    The itunes back up is the latest one but there are files in the folder from eariler when the original contacts were there.
    Cant these files be converted to give original contacts?
    Are the deleted contacts on the phone if i jailbreak it can I access them?
    Any other help or guidance is appreciated

    Thanks again

  103. I have read through this entire blog and still cannot find exactly what I need help with. I have some computer skills, but I am not a programmer so I may need a little more guidance than normal. This is extremely important if someone can help me and I will be very grateful. The reason for me doing this is my husband has been deleting messages with a specific coworker and the messages were no favorable on his behalf at all. I need these messages ASAP for my own piece of mind. I used the backup extractor and I have saved a backup of his phone almost immediately after he deleted the messages I am trying to retrieve. I am able to view quite a bit of text and a lot of numberical and symbols that mean nothing to me. I can see parts of messages but then they just stop. I assumed part of them are still encrypted of something. I have tried downloading so many of the apps you have listed but dont really know what I am doing. Could someone please walk me through how to view this file in its entirety on windows 7? I have been viewing the 3dod file. I dont know if there is more than one tht would allow me to piece the missing sentences together or what? Could someone please help me before I lose my mind trying to view this cheaters messages? Thanks so much!!

  104. I’ve followed along as much as possible but need more help. I have recovered what seems to be part of the deleted sms messages hubby deleted from gf in a backup file. However when i view them, they are partial bits of sentences with symbols and numbers etc. I am in dire need of seeing these messages in their entirety and I have paid for so many different apps and programs that claim to help. I only need to know how to view these messages from beginning to end. I assume parts of the file are still encrypted? I backed up his phone within a day or so of realizing he deleted the messages and he doesn’t send many messages so i cant imagine that they have been overwritten already considering in some files I can see messages clear back to Jan. Can someone help me please. I am using Windows 7.

  105. i need to retrieve de,eted texts from phone…they were not backedup in itunes…they are from feb 2011…i stopped using that phone in may. i was told there is memory inside the phone and if ohone is taken apart some datat may still be in there is that true? i have gotten all the back up data and the text i need are not there. please advise ninja

  106. Hi guys, I have a problem with my iphone (2g) ,
    i taking iphone on the desk and then automatically restarting and my contact is gone ! i don’t touch my phone and when i unlock phone and see contact list … there is no contact ! 850 contact deleted automatically !
    i don’t understand this crash ! PLEASE HELP !!!!!!!

  107. Hi,

    Very useful tutorial thanks.

    My question is. I reached addressbook.sqlitedb file both windows backup folder and under mobile\Library with ssh.

    I tried to access database via firefox sqlitemanager and sqlite3 command line.

    Somehow ABPerson does not contain any data. All tables are empty.

    But when I open addressbook.sqlitedb with notepad or hex editor I can see phone numbers and contact names.

    Is there any other way to read data from addressbook ex: visual basic etc.

    Thanks in advance

    1. Yes, there is, however it’s not quite simple to do. Please see my post above, I have implemented a set of algorithms for recovering such deleted records, so you can use my online service to recover the these records you can see in the hex editor, but do not appear in the sqlite interface.

  108. i have a problem. if any one can HELP me on this I would be in great gratitude.
    I have an Ipod touch 4th Generation. i had pictures and videos and was accidentally erased and i want to know if there is anything out there too do a recovery on it, i was wondering if there was a way to do it like you can do to every other storage device. please HELP..HELP..HELP

  109. Hay everyone hope this is not too late for all of you, but try this, Go to your contacts on the iphone, You will see no contacts, just tap the plus sign to add a contact, then add just the name of one of your contacts, spell it exactly as it would have appeared in your contacts, type the full name, then in the phone number area add just the first three numbers in the original phone number for that name. Than tap Done. Then they are all back. You might not have to have the name spelled exactly as it would have been in your contacts but this is how I did it. You might be able to just add a contact. Your iphone just needs to know where they all are again.
    Hope this help everyone.

      1. i tried it but somehow it didnt work and now o’ve had to set my iphone as a ‘new phone’ so i’ve lost everything.But i found a folder called iPod photo cache on my computer but it has .ithmb files…..How do I convert them to jpeg?

      2. Yea dude.. but it costs a tonn of money! its $30 = 1500 Indian rupees.
        Get a cheaper one instead..
        buy total saver from, costs $6 = 300 Indian rupees..
        does the same thing :)

        but i guess it works on os3 and os4 only.. not sure about os5

  110. i tried it but somehow it didnt work and now o’ve had to set my iphone as a ‘new phone’ so i’ve lost everything.But i found a folder called iPod photo cache on my computer but it has .ithmb files…..How do I convert them to jpeg?

  111. Hi Sharninder, what a great blog/post to help people! Thanks so much!

    My problem is this. I have backup, but I stupidly changed the name of the folder so now itunes doesn’t recognise it. Do you know what the naming convention for backup folders is? I used sqlite to look at the files and they all look fine. But if I can get the folder name back to what it was, i might be able to restore the information.

    I have an iphone 3GS with iOS5 and ma using a Windows XP PC.


    1. The name of the backup folder is the same as your phones UDID (Unique Device Identifier). For more info, and a description of how to get it, read on here:

      Alternatively (just an idea, maybe it does not work), you could just make a sync now, and I guess iTunes will recreate the folder with the right UDID name. After that, you could just copy the files from your renamed directory to the new one, and try to sync it back.

      1. Thanks IRO, I’ll try this when I get home tonight. I did have an additional problem of the syncing/backup hanging after it reached step 2 of 7 when I tried to create a new backup after the crash, but I’ll give this a go.

  112. hi…ive executed the suggested sql query which returns the firstnames, last names and values (ie numbers and email addresses) of all the contacts i need…..question is, how can i export this data to a text file ?….the export functions only seem to give the option of either the whole database, or a a whole table….all i need is the data returned….any suggestions ?

    1. Hi kold, I had the same problem so this is what I did. Using SQLite Studio, I exported the tables ABMultiValue and ABPerson as .csv files. I then opened them in Excel, choosing ‘comma’ as the delimiter. Once I had the two files open in Excel, I copied and pasted ABMultivalue into the tab next to ABPerson.

      I then used the Excel function vlookup to find the name for each number using the record number as the common key. The function in the cell next to the names looks like this: =VLOOKUP(B2,names!A$1:D$302,3) B2 is the record number in the ABMultiValue tab, names!A$1:D$302 is the range in the ABPerson tab and 3 is the column number with the names in. If your names are in two columns (first and last), you will need two formulae in neighbouring cells.

      I then copied this formula all the way down the list of numbers, and all the names appeared. From here it was just a short step to actually printing them all out and having a paper copy of all my contacts.

      I realise this looks a bit involved, but if you have used vlookup before you should be able to work it out quite easily. i did, and I’m not tecchie!

      Hope thisw helps.

    2. .. or you could just upload the AddressBook.sqlite file to my website, and download the CSV file in a minute, containing all contacts (including deleted ones), matched with all contact info (phone numbers, email addresses, etc). This service is not free anymore, but it’s not expensive.

  113. is anyone out there able to help me out here? the back up files are corrupted so they won’t appear on ‘restore from back up’ on Itunes. but It seems to have all the information for restore as there are bunches of weird numbered files. I managed to retrieved all the contacts using some websites. but i also need message history and all the memos. Can you guys please help me here!!?? cheers :)

      1. can you help me? i need to return my deleted sms, i saw them in FAR in backup file but i can’t understand how can i put them in sqlite base..( HEEEEEELP!

  114. Iphone Recovery Online,

    Can you recover the sms’s & contact list from a Iphone 3GS backup if they are encrypted…?

    My Iphone updated to ios5 and I’ve lost everything. The backup was from when I had ios 4.3.3 on there, but here is the horror story:

    It was done when I still had another sim card (tmobile). I put a password to encrypt it (worst thing I’ve ever done) and now everytime I type in the password, it says incorrect. Keep in mind, I only use one password, and I know for 100 % it is the correct one, but because the new sim card is different (KPN) and different phone number, it says incorrect password. Keep in mind I am not talking about a PIN code or a sim lock. Phone is also officially unlocked by Tmobile. I’ve tried every single password or PIN code combination, so finally since that all didn’t work, I tried to bypass the password screen by editing in Manifest & List under the backup files and putting encrypted to ‘false’. Then it no longer asks for password and recovers till it reaches 100%, then it gives this message: Itunes could not restore Iphone due to unknown error. Then it rolls back automatically….

    Horrible situation to be in… I had sms’s from 3 years ago from my girlfriend in there, lot of emotional value… Not to mention the 200 contacts I’ve lost.

    1. Dear Charles,

      I’d love to say yes, but with encrypted backups, the best answer I can give you is a strong “maybe”. With encrypted backups, you can never be sure you’ll end up with success.

      Modifying the manifest to say it’s not encrypted cannot help, because when it has a password, the file contents are stored encrypted in the backup folder (you can see this for yourself, try to open for example 3d0d7e5fb2ce288813306e4d4636395e047a3d28. If it starts with “SQlite format 3, then it’s not encrypted. If it’s noise, then it’s encrypted and you need to decrypt it first)

      So, the best you can do now is that you send me the files 3d0d7e5fb2ce288813306e4d4636395e047a3d28 (for messages) and 31bb7ba8914766d4ba40d6dfb6113c8b614be442 (for addressbook), and all the metadata files from the same backup dir (Info.plist, Manifest.mbdb, Manifest.mbdx, Manifest.plist and Status.plist)

      The strange part of the story (to me at least) is that changing the phone should not affect the decryption of the backup, as the encryption keys are stored with the backup, and not on the phone. Anyway, let’s discuss the rest offline after you send me these files!

  115. I am so thankful for your post.
    I used SQLite Studio, and ended up exporting the output from the query with a button.
    Again, thank you!!!

  116. Dear Iphone recovery,

    Only now did I read your response, thank you so much for taking the time to reply. I will send you those 2 files you mentioned. By the way, I found out about that sim code combining with the encrypted password by a google search. Looking for ways to decrypt I found one guy who said he had typed in the correct password to no avail, then he said he remembered that he had made that password when that phone had a different sim card inside. So he simply placed it in, opened itunes, typed in password again, and this time it worked… Unfortunately I had destroyed my other sim card many months ago because the membership was no longer valid so I couldn’t call with it anyway. It would have still solved my problem though, so now I hate myself for having done it. Seriously, encrypting that back up has got to be in my top 5 of worst things I’ve ever done…..

  117. Dear Iphone Recovery,

    I’ve just sent you an email in the way you’ve listed. I’ve attached a zip file with all the files you’ve requested. Hope you can do your magic.. Keeping my fingers crossed.


    1. Hello Charles,

      Were you able to get back your messages? Please let me know because I am having the same problem.


  118. Hello Charles,

    Were able to recover your lost messages having the iphone backup files encrypted? I am facing the same problem and I am almost hopeless! :(

    Please let me know.


  119. Dear Laura,

    I feel for you! I’m in a lot of pain over these sms’s. I have sent my files to Iphone Recovery but he is still working on it, he is going to receive new (improved) equipment, so there is still hope. I will let you know here as soon as I hear (any) news. Best of luck to you.


  120. If you have a PC then you can all do it easily on your own. Some week ago I found my little helper call iTwin here: I got back all my 500+ contacts. Both thumbs up!
    Good luck …

  121. Itwin worked for me. Now I can manually add my contacts to my 4S, since my 3GS died attempting the new update. Awesome!!!!!!! Wunderbar!

  122. It seems that your solution might have worked for earlier versions of iOS.. it didn’t work that well for me.

    Then I bought Total Saver from, just for $6
    Was able to recover everything in a couple of minutes..

    Thanks for the great post though.

  123. Hi,

    By mistake, i deleted all my contacts in Iphone 3gs. I got AddressBook.SQLITB. But, when i am trying to access it thru firefox SQLLite manager. I gives me only those contacts, which are still on my iphone (4-5).
    I tried uploading AddressBook.SQLLITB file to They are able to find all my deleted cotacts. But, they are charging money which i can not afford. Can anybody suggest me the way>

  124. I guess the deleted contacts must be in one of the table of AddressBook.SQLLITB but i am missing something. please suggest

      1. Dear Sharninder,

        I read all the column, guestions and your kind, volunteer and very helpfull answers.. and i had do admit that i found you the most serious and helpfull persin in the forums/blogs i have visited last one week just to get solution my problem..

        So I need your urgent help Angel Sharninder:)

        Shortly my problem;

        Just after I updated my Iphone 3gs to IOS 5.1 when i try to restore everything on my phone was deleted. But luckily since I had backed up my iphone in other pc, I found two back ups on Nov25-2011 and Feb21-2012. When i tried to restore from back up of Feb21, “bacause the back up was corrupt or not compatible with the iphone that is being restored” i couldn’t restore. I tried Nov.25 and it was successfull so immidiately i saved all those contacts, notes, photos somewhere secure and readeble now.
        I got IBACKUPBOT program i can easily view Nov.25 backup because i dencrypted it. but since I couldn’t restore Feb21 back up and since i can not deencyrpt it i can view back up of Feb21.
        since 99% of my contacts are saved before Nov.25, now my only urgent and important problem is to get my notes which are saved after Nov.25 up to Feb.21. since there are some accounting notes, i need those amounts, dates and names,:(
        I tried many ways but can not restore from back up folder of Feb21. The folder is with mE and I even found the Notes folder “ca3bc056d4da0bbf88b5fb3be254f3b7147e639c” and I saved it separetly in a different folder, NOW IT IS INTEReSTING THAT I SEE MY NOTES THERE, BUT I CAN NOT READ THOSE CHARACTERS AND UNDERSTAND IT.

        so sorry for writing too much but can pls help me to restore Feb21 back up or at least can you tell me how to make my notes folder “ca3bc056d4da0bbf88b5fb3be254f3b7147e639c” readible through SQLITE or any other program.

        since i am simple educator and do not know computer much pls tell me in simple way and SINCE I MAY NOT FIND THIS BLOG/FORUM AGAIN, can you send me your answer through my email pls, :)

        thanks alot..

  125. Freaking out over here…..I accidently hit restore when I linked my iphone to itunes… make matters worse I didn’t backup before I did this. Everything happened so fast……I realized what I had done and yanked the cord from the phone. after ten minutes I connected it again and itunes continued with restore. My life was on that phone. I called apple and they couldn’t help. So I paid the $24 and some change for the iphone backup extractor hoping it would work. Now I don’t know how to get the info from the SQLiteDB file. I am using a windows pc. Please, please if you could help I would be so grateful.

  126. I have a computer running Windows Vista Home edition and i can’t seem to locate the backup file anywhere. Any help would be greatly appreciated!
    I’ve looked everywhere, all the folders that people say to look at do not seem to exist on my pc.

  127. I have a corrupted Addressbook.sqlitedb database. It got corrupted during iphone backup. I opened the database with sql viewer but my database tables are empty. I see the data in the file when i open it with notepad. So there has to be a catch to retrieve contacts. reads data correctly obviously, but they charge 20$ for names and phone numbers. Can anyone help me out here?

      1. I know you will help me, I’m just trying to find a free alternative to recovering the contact data.

      2. Doh, that’s what I’m trying to give you ;)
        But I cannot do it if I don’t know which database is yours, and I cannot send it to you if I don’t know your email address. You wouldn’t be the first one who gets it for free.

  128. Okay then :) ill send it to you. It is my female friend’s database i screwed up (I’d rather say fuken iphone and itunes fuked it up).

    So how can i send you the database?

  129. Thanks to IphoneRecoveryOnline i was able to recover all of the lost contacts!

    I recommend this service to everyone having problems recovering lost data!

  130. I have a backup of my sms messages (3d0d7e5fb2ce288813306e4d4636395e047a3d28) and address book (31bb7ba8914766d4ba40d6dfb6113c8b614be442). However, they were encrypted so when I try to open them in textedit it comes out as ‘noise’. Fortunately, I remember the password I used for backup. How can I decrypt these 2 files? I don’t need to restore them, just to check some of their content. Thanks in advance.

  131. Hi, thaks a lot for posting such useful guides. I understand I have done something stupid: I accidentally reset my iPhone to factory settings via iTunes. I did not chose to restore from backup. now my iPhone contacts are gone from the iPhone and can only be found on my Windows Contacts. Is there a way to bring back my contacts from my PC to my iPhone? Do you think my iTunes backed up my contacts during the restore? Thank you so much for your kind help.

    1. Erikah, try using a third party program – something similar to the described in the article below – in order to drag/drop the contact entries from your Windows Contacts to your iPhone:

      If you restored your iPhone to factory settings and you did not choose to restore from a backup, iTunes may unfortunately not have kept a back up of your iPhone contacts in their latest state. If you have ll of your contacts saved to your PC, the safest is to transfer back the contacts from your Windows Address Book to your iPhone manually as described above.

  132. So yesterday my iTunes decided it was finally time to update my iPhone to version 5.1.1, so I let it do its thing and it ended up deleting all of my contacts.. so looking online i saw that one website had said to “restore from back up,” which I did. However the problem now is that I did not realize that my latest backup hadn’t been since March 19, 2012. So anything I’ve done since then has now been deleted. I am most worried about my pictures over everything else.. Is there any way to get those back, or override that “restore from backup” I did? I just really need to find my pictures and I know they’ve got to be out there somewhere.Thanks..

  133. Hello All,

    Just plugged my wife’s iphone on a new laptop and accidentally click on the override notes and now all her notes on the iphone are gone. Am frantically trying to recover the notes and have tried many tools from Backupextractor to wondershare but they only shows me the latest backup file. So far, this forum has been the most promising and … Sharninder … help!
    I search in the default itunes folder in my Vista system and saw there were many backups files there but somehow the no tool has been able to identify them. I remember clearly saw itunes “backup” something before it sync and am totally devastated !!
    Ran through the earlier posting but found no answer.

    How can i specifically use another backup file to extract only the NOTES. Not techie so sqlite and such gives me the headache … sigh. BTW, tried the iTwin tool also.

    1. There are two different software tool of wondershare i once used, which are Wondershare Data Recovery for iTunes and Wondershare Dr.Fone. Maybe they will help you extract data and restore files.

    2. If you have an additional backup (maybe on external drive) you can use iTwin to navigate to that backup. Just place the path under the settings-tab into the field “iTunes Backup Path” and give it another try.

Comments are closed.