On my system MobileSync/Backup has 3 folders. I think this reflects the tumultuous history of my iPhone and the flopped restore procedure. The name of the folder is the unique identifier of your iPod or iPhone:
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...and the name of the files is ...
... the name of each backup file is actually the SHA1 hash of its path...When I synched my iPhone 1 of the 3 folders was updated, so the others are either inactive backups or correspond to my iPod. (I think they're inactive backup files.)
My backup folder is 70MB but holds almost 1,400 items. It contains a small portion of my 8GB of iPhone data and apps.
The files end in .mdbackup. That leads to some interesting posts:
- TUAW: extracting notes data from an .mdbackup file
- .mdbackup may be Apple binary plists (format)
- a technical five part + discussion of iPhone backups (Oreilly)
and, when things are really bad, you will appreciate these tips on how to restore from an archive you've made of a "good" backup (I'm sure there will be a GUI tool to do this very soon.):
... You can examine the contents of these files and extract the backed up data from them using my mdhelper utility. It's a command-line Mac-based application that scans through these folders and allows you to extract files. For example, to recover all the png images from your backups, you could issue mdhelper -C png. Run the utility without arguments to see the built-in options...
What mdhelper does is this. It locates all backup folders. It reads in the Info.plist and Manifest.plist files and it lets you extract manifests and files based on a variety of search options. It stores extracted data on your desktop in a recovered iPhone files folder.
Pop back on Monday to learn more about backup files and how to force your iPhone to backup and restore from the Mac command line.
.. In order to restore a device, you run the AppleMobileBackup program using the restore switch, like this:I've zipped a copy of my latest "good" backup, and retrospect backs up these files too. It's good to know I can, if things are desperate, scrape lost data from these files.
./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...
Update 8/20/08: The iTunes Preferences "Syncing" panel lists the backups by name and date. You can delete unwanted backups there. It only lists my iPhone backups.