Tuesday, February 11, 2014

A cautionary iTunes tale (perhaps usefully illustrative)


About a year ago Bruce alerted me to the existence of the Audioengine W3 Wireless Audio Adaptor, conceptually the very thing I'd been looking for. The price was right, so I found a seller in Ontario and bought one.
The W3 consists of two parts: one you plug into a USB port on your computer, the other is connected to the amplifier of your stereo system. It turns your computer into an excellent, high-fidelity, wireless music server.
To get our extensive CD collection into the (160 gig) small iMac in a “lossless” format (ALAC, a proprietary Apple format) I bought a 1TB external drive, connected iTunes to it, and started processing CDs. I was at the time not very familiar with iTunes, but did know that it functioned with “playlists”, so reasoned that if I turned every CD into a playlist and identified each playlist with the number in the catalogue I've been keeping forever, I'd have the equivalent of our entire CD library literally at my fingertips.
And that's actually how it turned out.
Better yet, Sandy's iPad and iPhone could be made to control the entire system remotely, which is spectacular and even useful... but that's not what this post is about.
What it is about is how I managed to screw up a perfectly competent, functioning system, and what I discovered while restoring it. (Which, as you will see, I haven't completed yet, and won't, for weeks.)

The saga started when I was assembling some music files that I wanted to send. I'd noticed iTunes had an export function, so I thought: why not get iTunes to export those files?
Having done that, I discovered that I'd actually exported the playlists rather than the music, but before I'd properly processed this fact, I'd managed to corrupt the file. Still don't know how.
I cursed myself for not getting around to backing up the iMac's files, especially as Time Machine makes this dead simple, and all our other computers are backed up.
However, that meant re-doing the entire playlist file, a significant undertaking.
Next day I was already into the “B”s when I thought I should probably attach an external hard drive and fire up Time Machine.
Unfortunately, there are only 3 USB ports on the iMac, and all of them were in use.
Fortunately, we have a powered USB desktop hub, with 4 extra ports.
Unfortunately, it popped out of the computer's port while I was fiddling with the back of the computer, plugging and unplugging, while the iTunes external drive was attached.
That drive subsequently disappeared from its place on the desktop.
Disk Utility revealed that the drive was corrupted, and needed re-formatting.
You cannot reformat without erasing the contents, and for obvious reasons I did not want to process nearly 500 gigs worth of music files over again.
Annoying, but no particular problem, I thought: the music files were backed up on our system's Network Attached Storage, a small server available to all our computers.
I checked: while that NAS had many music files on it (and works quite well as a music server, but has limitations) in total it contained fewer than 300 gig, whereas the defective drive used 465 gig. 
Clearly, there was something wrong, and I wasn't prepared to risk losing even more files.
Time to try the Mac's Disk Utility's “recover” function: 5 hours later my latent suspicions were confirmed; all that was recovered was the defective disk, so no joy.
I decided I had to buy a recovery program for Mac.
Once installed, it ground away for over 12 hours -- happily mostly at night -- but did recover the music files.
So I reformatted the original music disk, got the computer to copy the recovered files onto it, and 5 hours later reconnected it to iTunes, then added the files to its library.
I started on re-creating the playlists, and instantly discovered that, according to the iTunes library, I now had two copies of every track, one functional and the other not. While that information didn't take up much room, it would make creating every playlist a nightmare.
So I trashed all the iTunes files (except for those recordings bought from the iTunes store, which appear automatically) and started over, connecting the disk to iTunes, then adding the files on it to the library.

And that's where I am at present. Time Machine is going to spend the next few hours backing everything up, and then I get to create some playlists...