Saturday, September 13, 2008

The Joys of Moving an iTunes Library Around

Itunes-LogoOne strength of Apple's approach to "tech" is to hide the details from us mere mortals. That works fine for the average user, but power users can become frustrated by Apple's deviation from the obvious. Let's consider things like iPhoto and iTunes Libraries--those rather large places on your hard drive that don't move very easily (especially iTunes Libraries).

If you're like me, you've screwed this one up more than once. Why do I not learn my lesson? Because Apple computers are so well designed and built, I typically own them for years at a time. My old AGP Power Mac G4 (I bought it as a 400 MHz single processor machine in 2000 running OS 9) just did start giving my problems, after 8 years of faithful service and more upgrades than I care to mention!

So I replaced my old G4 with a shiny, new Mac Pro. This change (and the upgrade to iTunes 8) made me feel it was time to MOVE my iTunes library back to its rightful place in my home directory from another hard disk (silly me). The last time I moved it was YEARS ago, and though something in my gut told me to beware, I went ahead and stupidly dragged the folder to my home directory a dufus. Ingrained tech erudition would lead most nerds like myself to believe that this act simply represents Computer File Management 101, but remember, Apple doesn't design their products for nerds.

The problem, of course, is that information about one's song collection is stored in the iTunes Library file, and I left mine in the ~/Music directory as is the convention. The space-munching audio files, however, are usually stored in ~/Music/iTunes/iTunes Music. Mine were on another hard drive (moved there years back to save space on my startup drive). If you simply drag the folder back to its rightful place and believe you can select the new location in iTunes Preferences (as convention would have you believe), you're sadly mistaken. For whatever reason, this does not work, and all the links to your music are broken. Sure, you can select the location for each song, one-at-a-time, but who wants to do something like that? That's what computers are for!

To properly move your iTunes music files around, select the new location in Preferences FIRST, and then use the Consolidate Library function to copy your files back where they go. However, I couldn't retrace my steps, because I had already reformatted that old drive. I even tried renaming the stupid drive back to its old name, but that wouldn't work either. So, I just dragged the contents of ~/Music/iTunes/iTunes Music back to the Library>Music icon in the iTunes Sidebar. It dutifully loaded all my music files again, and I was able to delete the broken links in the Library file. However, doing this means I lost all my Playlists and Ratings! Arggghh!!

The solution I found is linked below. I used Time Machine to recover my old iTunes Library file and exported my Library as an XML file (which you can also do for individual playlists). To keep the Ratings, I followed the steps below. Now, my iTunes Library is back from the dead. But I sure had to put in a lot of work to get it back. Don't do what I did...but if you (and you probably will), follow the advice in this post.

Apple - Discussions - Importing Ratings From Old ITunes:

One mod for anyone else who has this problem - if you export as a Smart List it imports it the same way and recalculates the rating. So you need to export a standard playlist for each rating. I did this by:

=> making sure the Rating column is visible in iTunes
=> right click or command-click to sort by ratings
=> select all the 5*s then say File > New Playlist from Selection
=> then select that playlist and File > Export .... and save as XML, say "My 5s"
=>then select the 4s and repeat as below

No comments: