Bandwagon Blog RSS

Archive

Bandwagon

Twitter

Mar
6th
2007
Tue
permalink

Bandwagon Deconstructed I: Restoring

Members of the team will be posting a mostly weekly blog post on Bandwagon. We’re calling it Bandwagon Deconstructed and its aim is to educate people on what we are doing.

This is the first in the series.

“Bandwagon Deconstructed I: Restoring”
A backup service is only as good as when the sh*t hits the fan and it’s time to restore. For most files on a person’s hard drive, restoring is a very manual process of selecting (files and/or folders) and choosing where to restore it to (original directory or on the desktop).

In most cases, the metadata (data about files) to be restored is included with the actual file (e.g. EXIF data for JPEGs). And most “normal” files don’t use metadata in a meaningful way (e.g. emls, .doc, etc.) so most people don’t realize that metadata might not even be restored.

In iTunes, this is all different. All file types on the Mac OS X that support Spotlight have a metadata store and the actual file index store. This is a sample of that metadata store for a .mp3 file.

Jaruko:~/Music/iTunes/iTunes Music/Bee Gees/Unknown Album jolo$ mdls If you leave me now.mp3
If you leave me now.mp3 -------------
kMDItemAttributeChangeDate = 2006-09-03 03:20:23 +0800
kMDItemAudioBitRate = 128
kMDItemAudioChannelCount = 2
kMDItemAudioSampleRate = 44100
kMDItemAuthors = ("Bee Gees")
kMDItemContentCreationDate = 2006-09-03 02:09:35 +0800
kMDItemContentModificationDate = 2006-09-03 03:20:22 +0800
kMDItemContentType = "public.mp3"
kMDItemContentTypeTree = (
"public.mp3",
"public.audio",
"public.audiovisual-content",
"public.data",
"public.item",
"public.content"
)
kMDItemDisplayName = "If you leave me now.mp3"
kMDItemDurationSeconds = 236
kMDItemFSContentChangeDate = 2006-09-03 03:20:22 +0800
kMDItemFSCreationDate = 2006-09-03 02:09:35 +0800
kMDItemFSCreatorCode = 0
kMDItemFSFinderFlags = 0
kMDItemFSInvisible = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSLabel = 0
kMDItemFSName = "If you leave me now.mp3"
kMDItemFSNodeCount = 0
kMDItemFSOwnerGroupID = 501
kMDItemFSOwnerUserID = 501
kMDItemFSSize = 3777109
kMDItemFSTypeCode = 0
kMDItemID = 874396
kMDItemKind = "MP3 Audio File"
kMDItemLastUsedDate = 2006-09-03 02:11:45 +0800
kMDItemMediaTypes = (Sound)
kMDItemTitle = "If you leave me now"
kMDItemTotalBitRate = 128
kMDItemUsedDates = (2006-09-03 02:11:45 +0800)

But iTunes keeps an “extra” set of metadata in its XML read via iTunes Library (ITL file), a binary representation of the XML (the XML is really just an iTunes backup in case ITL gets corrupted). Beats per minute, last played, play count and my rating are just a sampling of this “extra” metadata.

Before we wrote a single line of code, one of the things we did was ask music geeks what was important to them. Updating and backing up this extra metadata was on the top of their list. It is used to create smart playlists, among other uses. Most generic backup providers (if not all) do not utilize this metadata when restoring to iTunes (they might save the XML file as a consequence of selecting the ~/Music folder) so all those hours spent cleaning up your iTunes items and playing will be all for naught (unless you restore all the changed XML files and manually corrupt the ITL file so that iTunes can use the revised XML to re-create the ITL).

One of BW’s mantra is ease of use so we built restore automation that doesn’t involve any manual intervention. This added code but presented a one-click restore that allows for seamless individual restores and all restores (and media-type only restores in the future).

Btw, when choosing the “all restores”, you can start playing restored items, no need to wait for all 10,000+ items to be restored. Both types of restores are unique to Bandwagon and gives users a sense of comfort and security that if the sh*t does hit the fan, they’ll be in a different air conditioned room.

From a bandwagon tester: “The other day I accidentally deleted some music from itunes and got it back!! whew!”

How cool!

Comments (View)
blog comments powered by Disqus