In the MobileSync/Backup folder in your library's Application Support directory, you'll find one folder for each iPhone or iPod touch that iTunes has backed up to your Mac. In this folder, you'll find the following kinds of files:
Manifest.plist. The Manifest.plist file is created by the iPhone backup utility on your computer. It uses this manifest to check files for corruption and (inadvertently, I'm sure) prevent any data changes on the Mac side from being sent back to the iPhone.
Info.plist. Each device's Info.plist file is created by iTunes. It stores your iTunes preferences for that unit along with basic device information.
mdbackup files. Like the manifests, the mdbackup files are created by the iPhone backup utility. If you delete any of these files, they're re-created the next time you sync and back up.
You can manually force a sync or a backup by running a special backup program from the command line. It's located at /System/Library/PrivateFrameworks/MobileDevice.framework/ Resources/AppleMobileDeviceHelper.app/Contents/Resources/ AppleMobileBackup. I created a symbolic link to this utility from my home folder for convenience and called it ambackup. I'll use this linked name for the following examples, to save typing out that insanely long path again.
To back up an attached device, you must specify its target ID. This is the name used for the folder in the MobileSync/Backup directory. The target ID also appears in the Info.plist file. Issue the following command using the target ID for your device.
./ambackup --backup --target targetid
The device immediately backs up to disk. This goes surprisingly fast, even when you've deleted or moved the backup folder. So don't expect it to take a long time.
In order to restore a device, you run the AppleMobileBackup program using the restore switch, like this:
./ambackup --restore --target targetid
This throws your iPhone into restore mode and returns any uncorrupted files from the backup folder to your device. This takes quite a bit longer than the backup, so prepare to wait a few minutes for it to complete.
If you want to restore your phone from a folder that is different from the target ID normally used, supply a source folder name as follows:
./ambackup --restore --target targetid --source sourcefoldername
If the source folder is not found in the backups folder, one is created. If it is found, that manifest and those files are used to restore your iPhone.
Be sure to stop by again on Friday, when I begin to discuss how the mdbackup data globs work (they're serialized data) and how my mdhelper utility extracts that data to disk. And then, next Monday, I'll show you how to embed serialized data back into mdbackup or manifest files.
Erica,
great work as usual -i'm a bit late commenting here, i read it ages ago and today i've come back to it, finding it useful with the upgrade to 2.0 fromm 1.1.4.
Have you any thoughts on how to do this in windows, please? (which i'm stuck on just at the moment)
The windows equivalent software is here (on XP): C:\Program Files\Common Files\Apple\Mobile Device Support\bin\AppleMobileBackup.exe
Cheers
OK, so as we said elsewhere, i solved it on windows, with a bit of your encouragement to try again.
C:\Program Files\Common Files\Apple\Mobile Device Support\bin>AppleMobileBackup.exe -h
usage: AppleMobileBackup [--backup | --restore] --target device_id [--source device_id]
EG. C:\Program Files\Common Files\Apple\Mobile Device Support\bin>AppleMobileBackup.exe --backup --target ????????????????????????????????????? [device_id = folder name]
Hi Erica,
When I try to find the path below I can only find the applemobiledevicehelper.app
The remaining path (contents/resources/applemobilebackup) I cannot find. What do i do wrong? I have a Mac 10.4.11
regards, Harm
/System/Library/PrivateFrameworks/MobileDevice.framework/ Resources/AppleMobileDeviceHelper.app/Contents/Resources/ AppleMobileBackup
You need to go inside the Application bundle. Select the bundle and then right click it. Choose Show Package Contents from the pop-up
Hi there. I restored my Iphone 3G (software version 2) but all 5 of the backups in Itunes are corrupted and I have to create a new profile on restore. I really want to get my photos back and have read the hackint0sh thread on how to do this with MDhelper. Can you help me with how to extract the jpgs on a PC please?
Thanks very much for your help.
Adam
I tried this on a windows XP machine. I tried restoring my phone to a backup I made yest at approx 2:30 pm in the afternoon - the folder name ends in 20080809-143844. Now, after running AppleMobileBackup.exe as follows:
AppleMobileBackup.exe --restore --target
I don't see the phone getting restored (Restore In progress doesnt show up on the phone). It doesnt even go into recovery mode as it's probably supposed to. And after a while, when AppleMobileBackup.exe quits, I see the folder is now called -20080809-143844-20080810-212145. The folder has the current backup time suffixed to it now somehow. I tried restoring from this in iTunes, but I still keep getting a corrupted backup error. Is there a way to get around this and somehow force iTunes to restore?
I tried this on a windows XP machine. I tried restoring my phone to a backup I made yest at approx 2:30 pm in the afternoon - the folder name ends in 20080809-143844. Now, after running AppleMobileBackup.exe as follows:
AppleMobileBackup.exe --restore --target
I don't see the phone getting restored (Restore In progress doesnt show up on the phone). It doesnt even go into recovery mode as it's probably supposed to. And after a while, when AppleMobileBackup.exe quits, I see the folder is now called -20080809-143844-20080810-212145. The folder has the current backup time suffixed to it now somehow. I tried restoring from this in iTunes, but I still keep getting a corrupted backup error. Is there a way to get around this and somehow force iTunes to restore?
Hi,
I am getting repeatedly a "segmantation fault" error when running mdhelper. I have tried to download it several times, and expanded the .zip archive with three different programs...
What can I do to make it run?
Thanks in advance
Hi, I am still unable to use mdhelper... Always "segmentation fault". I have even tried to run it on different computers, to no avail. I am trying to recover some sms, notes and pics I deleted and running off time, as I have a deadline to meet!!! Please someone can help?
Hi Erica:
Is there a program or set of instructions that can help basic users like myself restore lost iPhone data from my desktop's "mdbackup" documents in the "MobileSync/Backup" folder? The instructions you printed above left me one step short as my "Resources" folder did not include a "AppleMobileBackup" icon.
(/System/Library/PrivateFrameworks/MobileDevice.framework/ Resources/AppleMobileDeviceHelper.app/Contents/Resources/ AppleMobileBackup.)
In short - can i somehow hear mdbackup docs (hopefully) backed up from my iTalk application?
Thanks so much
Hi,
I have the same problem as Nash D.
I use ed755b786b4de036fcc0d5399bead0960657d3ae-20090202-003917 as the target id, however I get ed755b786b4de036fcc0d5399bead0960657d3ae-20090202-003917-20090202-193056 as the result.
Any advice would be valued.
COng
Some of the commenters on this article might find the iPhone Backup Extractor at http://www.reincubate.com/labs/iphonebe useful for getting their data back.