Search

What's New
widget content
Recommended Books

iPhone Backups Part 2


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.





AddThis Social Bookmark Button





This blog is licensed under a Creative Commons License.