Okay, isn’t it about time that iTunes stop doing things so bass-ackward?ADHERER
So, I decided to move my Mac Mini from one desk to another and somehow, in the 2 minutes that one of my external drives was unplugged, it decided it no longer wanted to work. Of course, that was the drive where all of my media was stored.
So here’s the setup. A Mac Mini does not have a sizeable enough drive to hold all of my media. Truth to tell, anyone who has more than 2 movies and 200 songs will need to move their media to an external drive. And it’s pretty easy to do that. Just tell iTunes where you want the media to be stored (assuming you allow iTunes to gather and maintain the collection for you) and then tell it to Consolidate Library. It will move everything for you.
Well, I’d done that, but for some reason, iTunes would forget all of that and go back to its default location, which is ~/Music. So periodically (and I don’t know what caused it… perhaps updates?) iTunes would just say, “hey, you have no content!” To which I would scream, “well I did yesterday!!! Where did you put it?!?!”
So, I got into the symbolic link thing. I deleted my ~/Music folder and used the “ln” command to create a symbolic link to the external drive where I wanted iTunes to store everything (including its own database). That seemed to work well, as iTunes no longer “forgot” where stuff was. But instead of using the link’s path, it would resolve the link and use that instead.
Here’s what I mean by that. If the link is ~/Music and the link’s external path is /Volumes/External/Music, then iTunes has all the media locations stored as /Volumes/External/Music/… instead of ~/Music/… Well, that makes things difficult if you want to move things. Or if you HAVE to move things (like, say, if the external drive dies).
Fast forward to yesterday. The external drive died and I had a backup on my Windows Home Server box. So I did a restore to my other external drive that’s connected to the Mac Mini… only took about 7 hours to copy all of it! Then I changed the link to point to the new location. But since the drive has a different label than the dead one and since I put it all under a sub-folder, simply opening iTunes didn’t do a thing. All of the media was supposedly in the old location, not the new one, according to iTunes.
So I had to re-import everything. I used iTunes 9’s new “Add to iTunes” folder to add everything, which worked great. It’s fast and imports very well. But of course, there’s all the normal iTunes headaches to contend with.
iTunes doesn’t store anything in the files themselves. It’s all in its own database, which when you have a screw-up like I did (and have had many times over the years), all of that data is lost.
This includes play counts, ratings, media types, album art, etc. This can really suck if you depend on this metadata and if you have a ton of files!
Smart or Dumb Playlist?
I have and use a Smart Playlist of my “favorite” songs, which I indicate as 4 or 5 stars. Well, that’s all gone. My trick for getting that back (this isn’t my first time at this rodeo, cowboy) is to periodically export that playlist, which creates an XML file. Said XML file contains a list of the songs and the Smart Playlist information. Well, step 1, I had to change the locations for all the songs. Not too tough, just figure out where the songs are currently and do a global replace. But that isn’t all of it. Once iTunes sees the Smart Playlist data, it will just use that. So, since none of my songs have ratings anymore, the playlist comes up empty. So the next step is to find and delete the Smart Playlist data from the XML file. Doing that makes iTunes see it as a regular non-Smart playlist and can import successfully. Then it’s just a matter of selecting all in the playlist and rating the files with 4 or 5 stars. Then I can delete the playlist and re-create the Smart Playlist of my favorites.
By the way, I do this trick with track ratings because it’s the only good way to manipulate playlists on the iPod or iPhone, since rating is the only piece of metadata that can be edited on-the-go.
Movies or TV Shows?
The next pain in my rear is the fact that, for some reason, I have never been able to get my Firefly videos to be tagged internally as TV Shows. So that means that whenever I have to re-import my media, they all get stuffed into iTunes as movies, instead of TV shows. It’s not too tough to change them in iTunes, since that is now an option in the Info screens. But as I said, iTunes keeps that to itself, not tagging the files themselves in any way. So next time I have to re-import, those files will be brought in as Movies again. (I re-tagged them using MetaX, so hopefully that will help. Note, however, that once iTunes thinks the file is a Movie, retagging the file itself won’t move it to the TV Shows area. You still have to tell iTunes that the files are TV Shows)
Album Art Anyone?
The next thing is to re-do all the album art. Many of my files have the album art embedded in the songs themselves, so iTunes dutifully displays them. But anything that’s been ripped by iTunes or didn’t have album art before, you have to do it all over again. Thankfully, iTunes can download any album art for any songs that are tagged correctly and are also in the ITMS. Of course, that leaves out any artists that are not in ITMS, such as AC/DC. What I do there is to select the album’s tracks, go to Info, and then drag the album art into place on that page. You can drag-and-drop art directly from FireFox, so I go to Amazon and grab the album art from there. Easy-peasy… but still a manual effort.
Backup?
So the question becomes, how should this stuff be backed up? I kept a copy of all the files and all of iTunes “databases”. But that still didn’t help when I had to move the iTunes stuff to a new location. iTunes can do that for you, but what if, like me, you can’t get at the old stuff? Some of that metadata is important. Much of how iTunes likes to handle things is by play count or whether the file has been played or not. For instance, my iPhone’s TV Shows settings is to put all unwatched episodes on the iPhone. Well, when I had to re-import everything, it marks all TV Shows as unwatched. So I had to manually go through them and mark the already-watched shows as such.
iTunes also comes with a pre-loaded Smart Playlist of your most-played tracks. That’s great! But if you have to re-import everything, suddenly they all have play counts of 0.
You can hold Option when starting iTunes and it will ask you for the location of the databases. This works great, but if the location of the media is changed, then you have to relocate each file manually. And that’s a pain when, like me, you have 200+ movies, 150+ TV shows, and over 6,000 songs!
The ID3v2 tagging spec allows for user tags. Why doesn’t iTunes adopt this standard and then it can place whatever metadata it wants in the track itself? Is it because it takes too long to update the whole file just for a play count? Surely that’s not the best excuse not to do this. Once the tag is created for the track, it should be easy to find it, re-write that bit, and not have to re-write the entire track. But perhaps I am being obtuse. Say it takes 5 seconds to do it, that might create a 5-second gap between songs. Okay, I can see why that wouldn’t be the best way to go. But why not use the “Consolidate Library” function to write all of the gathered metadata back to the tracks themselves? That’s something that a user could do on a daily or weekly basis when he isn’t using iTunes to play media. Just click it and let it run overnight. After all, it really shouldn’t take more than 5-10 minutes to put all of the metadata into the files themselves
So who has a solution to this? How do you backup iTunes data and then restore it later after a disaster? If anyone has figured this out, please let me know. I’m anxious to do this the right way.

Epilogue: the drive came back to life so I pressed it into service as a backup drive. Ran backups last night on everything using Carbon Copy Cloner. Then this morning, when I went to sync my iPhone, iTunes had just lost the entries to all my music, some of my TV Shows, and all of my iPhone apps… WTF?!?!?!?
The files were still there, but iTunes just didn’t have the entries.
-Mike
And in the latest round of oddities, iTunes decided to lose the location of all the apps on my iPhone. After several good syncs over several days, I went to sync my phone today and it said that there was content that needed to be gotten off my phone. Turns out, it was all the apps. The entries were still in iTunes, but they had the little exclamation point saying that it couldn’t find the files. And, just the apps that are on the iPhone. The apps that are on my computer in iTunes that are not installed on the phone are fine.
WTF?!?!?!
-Mike