Recovering your iTunes Library metadata

Woke up one morning, went to iTunes to choose some music to play while on my exercise bike, and ... iTunes came up empty - no music or playlists to be seen!

Chilling, huh?  And a bit of rooting on forums online shows that this happens quite regularly.

The good news if this happens to you is that it is probably just the iTunes Library metadata that is missing - the list of all the tracks in iTunes, plus all your playlists and playcounts.  The actual music files are still there on disk.  And the titles, names of albums, lyrics, and artwork for all your music are stored inside your mp3 files, so those are safe as well.

To check if this is the case, go to iTunes > Edit > Preferences > Advanced, and see where iTunes is storing all your music files:

Then go to this folder on disk and see if all your music files are there.

If they are, then you have three options.

A.  Recover your iTunes Library after upgrading iTunes

If you have just upgraded your iTunes software to a new release, the good news is that an automatic backup of your Library files should have been made during the upgrade.  To recover these, see No content shows up in iTunes after updating.

B.  Recreate your iTunes Library by re-importing all your music

This will result in the new Library file listing all your music - without all your old playlists and playcounts.

  1. To do this, start by going to iTunes > Edit > Preferences > Advanced, and uncheck the box that says "Copy files to iTunes Music folder when adding to library"




  2. Now go to iTunes > File > Add folder to Library...  Choose the main folder containing all your music files.  iTunes will then read all these back into your new Library files.

  3. Go back to step 1, and re-check the "Copy to iTunes Music folder" box.

C.  Recover your iTunes Library files

iTunes keeps your Library in two files - an XML file and a binary file.  If you can only recover the XML file, iTunes will recreate the binary file from it.  You can find these files in My Documents\My Music\iTunes on Windows:

 

 

If you have been backing up these files (see Backing up your iTunes information), then this is will be straightforward.

Otherwise, if you do regular image backups of your drive, you may be able to extract these files from your last image backup (you can do this with Acronis).

Once you have recovered these files, you can either

  • re-add the music you had added since that backup, using the procedure in (B) above, or
  • backup your playlists, delete and recreate your Library file using (B) above, and then restore the playlists (you will have lost your playcounts though).  To do this, see How to backup and restore playlists.
     

See also

Useful sites

 

iSpace Links