That fucking iTunes has wiped my music library

The place for all discussion on gaming hardware
Post Reply
User avatar
Daigohji
Posts: 1292
Joined: Thu Jul 06, 2006 2:09 pm
Location: England

That fucking iTunes has wiped my music library

Post by Daigohji »

After a few years of using iTunes with no more than the usual level of irritation, this evening it suddenly decided to wipe my entire library for no apparent reason. I can guess at what prompted it, but not why. I was charging my iPod Touch via the USB port when I opened iTunes and found the main library empty (normally I'd open iTunes before connecting the iPod). My account was logged in, but there was no music, podcasts, games or playlists besides the system defaults.

Checking the library file in the iTunes folder showed that it had been modified when I opened iTunes, resulting in a measly 3kb file. I don't know how it decides when to make backups of this file, but the last one is dated in 2011 and is about 1Mb. Clearly, it has fucked up badly. Weirdly, the previous versions of a couple of files called iTunes Library Extras and iTunes Library Genius were dumped into the recycle bin, but not the main library file. I've never seen it automatically drop files in there before.

Fortunately, I haven't lost the actual content. It's all on my iPod, and the original music/game files are still in the iTunes folder; the program is just acting like they aren't.

Does anyone know how I can restore my music, podcasts, etc, with minimal fuss? Doing a restore from the iPod will presumably only copy the content bought from the iTunes store, not all the other content I've ripped from my CDs, and I don't know if it would sort out the state of my various podcast subscriptions.

Any help would be much appreciated. Also, any idea on what could have caused this and how I can prevent it happening again? (NB. ditching iTunes isn't an option)

I'm running Vista, iTunes 10.5.0.142, and have a 4th gen iPod Touch running iOS 5.0.
Image
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: That fucking iTunes has wiped my music library

Post by Ed Oscuro »

Daigohji wrote:(NB. ditching iTunes isn't an option)
I hope there is an option to back up items outside the iTunes library, at least. Apple support mentions backup options on an external drive, but if you have any loose MP3s, I would just go ahead and copy them out of iTunes' clutches altogether. Good luck.
User avatar
shmuppyLove
Posts: 3708
Joined: Thu Apr 07, 2011 1:44 pm
Location: Toronto

Re: That fucking iTunes has wiped my music library

Post by shmuppyLove »

To get the music that's on your iPod off of it, use SharePod.

As for your previously library file, if you haven't got a backup, you're basically fooked. However, all your music files should still be there. Were you storing all your files in the "iTunes Media" directory, or did you have them elsewhere?

Remember that the library file is really just a big database of pointers -- just because the data isn't showing in iTunes doesn't mean the files aren't there, it just means the database got nerfed somehow and iTunes forgot where they are.
gray117
Posts: 1235
Joined: Fri Jul 25, 2008 10:19 pm
Location: Leeds

Re: That fucking iTunes has wiped my music library

Post by gray117 »

You've got all content just not organised?

There should be an itunes library file somewhere - *.itl

If/when you install new versions a backup is made so hopefully you've at least got an old one somewhere. Hopefully you'll have a more current one either on a comp or cloud...? Make backups and try simply copying it over with another itl file?

The only case I know of where it'd be wiped totally is if an update fails and the ipod gets reset back to factory settings - which doesn't sound like that happened here, because I believe it wipes content too and it seemed to just do this without you doing anything?
User avatar
Daigohji
Posts: 1292
Joined: Thu Jul 06, 2006 2:09 pm
Location: England

Re: That fucking iTunes has wiped my music library

Post by Daigohji »

shmuppyLove wrote:Were you storing all your files in the "iTunes Media" directory, or did you have them elsewhere?

Remember that the library file is really just a big database of pointers -- just because the data isn't showing in iTunes doesn't mean the files aren't there, it just means the database got nerfed somehow and iTunes forgot where they are.
Yeah, the music files were all in the iTunes Music folder, but with the library index wiped and replaced with a blank one iTunes didn't know it was there.
gray117 wrote:You've got all content just not organised?

There should be an itunes library file somewhere - *.itl
There were library .itl and .xml files where they dhould be, but they had been reset back to empty files of only a few kb each, rather than the 10Mb or so that used to describe my collection.

Well, in the end I decided I had to go the long way around to fix the problem. I had to back up 50Gb of audio files to another part of the hard drive, uninstall iTunes, download the latest version, install it, restore my purchased content from my iPod, prompt iTunes to search its core folder to find my CD rips, manually resubscribe to a dozen podcasts streams and tell iTunes which of the hundreds of files I've already listened to so it doesn't sync them all to the iPod, export the playlist text files from the iPod to the hard drive, import the playlists into iTunes, and then wipe and resync 25Gb of content back to the iPod because it now counts the iTunes setup as a different library. All told it took about three and a half hours.

I now have my complete collection available on my PC and iPod again. The only leftover side effect is that iTunes has created duplicate files of my purchased content. It's only syncing one copy to the iPod though, so I can't be bothered weeding out the superfluous copies on the hard drive.

At least now I know that it's possible to manually export backup copies of the library directory, so if this ever happens again, hopefully I won't need to go through so much tedium to repair it.

Thanks for the pointers on this one, guys.
Image
Post Reply