My 8 Year Old iTunes XML Library File Got Corrupted

After work yesterday I spent a good few hours trying to recover what became a corrupted iTunes Library xml database file. For those who don’t know, I am a pretty big music fan, but I am also a huge data collection nut.

Some people are pack rats with paper things, I am a data pack rat, which means I should also be a backup freak, which I am not, but I do a moderate amount of backup, which usually saves me some headache, but not all.

So what do you do when the iTunes Library xml database file you have been using since 2001, for over 8 years and 5-10 different computers, gets corrupted. You let the stupid thing recover itself and don’t inadvertently hit the “stop” button, or you just start all over. In a brief thought of “what is this thing doing” I stopped a recovery effort that iTunes was properly making to put a final stamp on the library file in which it was overriding at the time.

An Old iTunes Library File, Built Since 2001

I had been collecting this play data since I started burning mp3’s back in 2001. I could look at any one of my (approximately) 17k music files and see when it was last played, how many times it had been played, when I added the file to my collection, and what start rating it had, now, I see empty boxes. After determining that I could not recover the corrupted file, I faced a few choices. Use the latest backup I had, which was from July 13th, or start over. July 13th may not sound bad, but I have probably added 25-30 albums since that date, and I have absolutely no way in the world to determine which albums those are to add them back into my library one at a time.

Had it been a couple of days that would have worked, but to try and remember each individual cd added when they are all now alphabetically filed would be impossible for me to determine.

How iTunes Works With a PC

Just in case anyone needed a quick iTunes Library file tutorial so something like this doesn’t happen to all their hard work, he is a real brief overview (and I am in no means an expert at all). iTunes uses two main files, stored in the “music” folder of your “my documents”. These files, are the iTunes Library.itl file and the iTunes Music Library.xml file. The .itl file controls or stores all your play count data and the .xml file is the database library of music that is called from the .itl file.

What this means is the xml file can be rebuilt by the iTunes Library file (if you let it), so as long as you have a copy of this file, you can just do a quick copy and paste into the proper directory and all your historical data is there.

Backup Your iTunes Library Files, Now

The moral of this blog post would be, backup often, backup frequently, backup now. iTunes Library files are probably one of the easiest backups to make. Just go into your music –> itunes directory, copy the two library files, then paste them into a new folder called “backup”. iTunes actually does this for you every so often, but is the frequency that itunes backs up your data frequent enough? For most, probably. For me, wasn’t even close but I also wasn’t really paying attention, so now I get to start over. At least I didn’t loose the music files, only the really cool data that goes with it.

[update] I was able to use the newest saved file and then import my new music added since that file.  At this point don’t ask me how, it was a huge mess and I really don’t know how I got it back but I did.  Backups are now running daily.  Can’t wait until I get a MacBook and have to try to take my pc based iTunes file and convert it.

[update 2] it seems my itunes library now will not find the songs, some 17,800 songs unless I manually point each one, one at a time to the proper location.  I am sure this had something to do with me moving my music files to an external hard drive… but I have tried to change the drive letter iTunes looks at and that does no good.  At this point, after being able to recreate my itunes library in July, I think now in September the library history is finally going to kick the bucket.  I had a backup this time from yesterday, but it does no good when it won’t locate the files on the hard drive.

This is extremely frustrating but I am about to buy a MacBook Pro anyway and will have to move my itunes library over at that time without any history anyway.  So, here’s to 5 to 8 years of music history, down the tubes.  I am now reimporting all of my music from the external hard drive and slowly converting everything over to the Apple Lossless file format instead of mp3.  This should improve the sound quality and hopefully work with my ipod, iphone, and mac book.

2 thoughts on “My 8 Year Old iTunes XML Library File Got Corrupted

  1. First off I want to say great blog! I had a quick question that I’d like to ask if
    you don’t mind. I was curious to find out how you center yourself and clear your head prior to writing.

    I’ve had difficulty clearing my mind in getting my
    thoughts out there. I do take pleasure in writing but it
    just seems like the first 10 to 15 minutes tend to be wasted simply just trying to figure out how to begin. Any recommendations
    or tips? Thanks!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s