Viewing By Entry / Main
December 28, 2007

This morning when I hopped on my home desktop machine, I was greeted with a nice iTunes error message telling me that my iPod was trying to sync with a library other than the one it was registered with. Huh?? A quick look at iTunes revealed the problem - it was completely blank! No songs, no podcasts, nothing. That's odd, because I have close to 30k songs I've ripped. I had a good idea what was wrong (but not how/why it happened). A quick look in my "My Documents\My Music\iTunes" directory revealed the problem. Both my "iTunes Music Library.xml" and my "iTunes Library.itl" file were only a few bytes each - when each of them should have been close to 50MB.

To make matters worse, I'm obsessed with meta-data. I have all of the album art and ID3 data for every single song - which is OK because the album art is stored in the directory for each album, and most of the meta-data is in the ID3 tags. BUT, because iTunes insists on using ratings outside of the ID3 tag format, all of the rating information I had accumulated (and associated smart playlists) was gone.

To top things off, I hadn't bothered to make a backup of my iTunes Library XML file lately because I'm running low on storage space. No excuse, I know.

Luckily, while I was looking in the iTunes directory, I noticed a sub-directory called "Previous iTunes Libraries". Inside that dicrectory were several copies of my "iTunes Library.itl" file. The most current one was about three months old - probably the last time I upgraded iTunes. Best case scenario I was looking at here was getting my library back, minus about three months worth of meta-data.

Getting iTunes to use the old .itl file was easy:

  1. Close iTuned
  2. Delete the blank/corrupted "iTunes Music Library.xml" and "iTunes Library.itl" files from "My Documents\My Music\iTunes"
  3. Copy the backup "iTunes Library.itl" file from the "Previous iTunes Libraries" directory to "My Documents\My Music\iTunes"
  4. Open iTunes - all of your music and meta-data up to the point of the backup file will be back.
  5. You'll need to add any music that you've gotten since the update. For me, that was easy. I just choose Add Music from Folder from the iTunes menu and chose the root directory where all of my music is stored. In about 10 minutes, iTunes had added all of the missing songs back to my library

There you have it. Relatively easy way to recover a deleted or corrupted iTunes library. Now if only I knew why iTunes decided to wipe it out in the first place.

Comments
Bruno's Gravatar Thanks soo much for this post !!! It's the second time this exact same problem appends to me !!! I did the same as you and now works fine !! :)
I don't have a clue why itunes does that... it has been doing that to me two times since I've upgraded to VISTA and put my itunes library on my portable 500Gig HD . I have a feeling one of them is responsable for this... Did you found out the cause of this ??
# Posted By Bruno | 1/8/08 7:51 PM
Rob Brooks-Bilson's Gravatar Hi Bruno,

I'm glad you found this post helpful. So far, it's only happened to me once, and unfortunately, I still haven't found out what caused it. If you ever do find out, though, let me know.
# Posted By Rob Brooks-Bilson | 1/9/08 5:35 PM
petter smith's Gravatar Thanks for such a good suggestion because such a situation also appends to me and this article helps me .No i have no clue why itunes does that.

Petter Smith
# Posted By petter smith | 2/2/08 1:48 AM
Rachel Cunningham's Gravatar Thanks so much for this post! I opened iTunes this morning and it was empty... and I nearly had a heart attack. Although I did lose some playlists I created in the last couple of weeks, it wasn't nearly as bad as my entire library!

Thanks again,
Rachel.
# Posted By Rachel Cunningham | 2/10/08 12:28 PM
Nancy Sell's Gravatar THANKS! This fixed my iTunes. As with everyone else, don't know what caused it.
# Posted By Nancy Sell | 4/9/08 11:45 PM



Copyright 1995-2008 Rob Brooks-Bilson. All rights reserved.
Aura skin for Raymond Camden's BlogCFC inspired by Joe Rinehart & Steven Erat. This blog is running version 5.5.1.