Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sammy's

macrumors member
Original poster
Nov 13, 2018
82
7
Hey - posted this question over in the El Capitan forum but didn't get any responses and not sure if I'd have better luck here or if there is a better location for it.

I upgraded the hard drive in my Mini running El Capitan and I backed up and saved my iTunes - when I restored the iTunes on the new drive I am missing some playlists and some music is not showing up. But when I go into the iTunes folder -> iTunes Media folder -> Music folder - I see all the music. Why is it not showing up? And where did the missing playlists go?

Any help in resolving this issue would be greatly appreciated - thanks!
 
How did you back it up? The problem you describe sounds like a corrupted Library database. This is stored in the file named iTunes Library.itl. The default location for this file is inside the iTunes folder that is located in your Music folder. Not sure what might have caused this, but a classic way to damage this file is if you store your media on an external drive and then start iTunes when that drive is not available.

I suppose it could also happen if you copied all your media to the new drive but did not copy iTunes Library.itl. Or perhaps something else happened to corrupt the file?
 
  • Like
Reactions: Sammy's
How did you back it up? The problem you describe sounds like a corrupted Library database. This is stored in the file named iTunes Library.itl. The default location for this file is inside the iTunes folder that is located in your Music folder. Not sure what might have caused this, but a classic way to damage this file is if you store your media on an external drive and then start iTunes when that drive is not available.

I suppose it could also happen if you copied all your media to the new drive but did not copy iTunes Library.itl. Or perhaps something else happened to corrupt the file?

Yes - I backed up on an external before I swapped the hard drive. Is there a way to fix this? Should I try and restore from scratch - what would be the best way to do this?

Thanks
 
You still have not explained what you mean by "backed up". How did you do that? How did you restore the backup to the computer? If you used software like Carbon Copy to clone the original drive, you could boot from the clone and see if you have the same problem.
 
You still have not explained what you mean by "backed up". How did you do that? How did you restore the backup to the computer? If you used software like Carbon Copy to clone the original drive, you could boot from the clone and see if you have the same problem.

I just copied the iTunes folder to the external. Maybe like you said - I had iTunes open before I added the folder back?
 
Yes, that might cause it. But it could have been a variety of other things too. I think you made a mistake by not cloning the original drive before you changed the hard drive. You would then have an exact copy of everything. But that is water under the bridge now.

Copying the original folder with the media and library files might fix it. In the worst case, you should be able to start from scratch by deleting the library file and then adding all your media back into iTunes, which should create a new un-corrupted library file. This should preserve all the metadata that is contained in the individual media files but not other things like playlists or play counts. But I would be hesitant to do that unless everything else fails - caveat emptor! :eek:
 
  • Like
Reactions: Sammy's
Yes, that might cause it. But it could have been a variety of other things too. I think you made a mistake by not cloning the original drive before you changed the hard drive. You would then have an exact copy of everything. But that is water under the bridge now.

Copying the original folder with the media and library files might fix it. In the worst case, you should be able to start from scratch by deleting the library file and then adding all your media back into iTunes, which should create a new un-corrupted library file. This should preserve all the metadata that is contained in the individual media files but not other things like playlists or play counts. But I would be hesitant to do that unless everything else fails - caveat emptor! :eek:

How would you approach?

If it matters I should have a Time Machine backup - but not sure if you can grab just the iTunes from that.
 
You should be able to grab any old files from time machine by clicking the little clock icon in the toolbar and selecting "enter time machine". I find it hard to suggest any course of action, since I don't understand exactly how the problem occurred - and I won't have to live with the results like you will if you mess it up. ;)

Personally, I would have cloned the disk before doing anything, as I suggested above. Of course it's too late for that now, but I would still make a clone of disk in its present state, so you can always at least get back to that. Carbon Copy Cloner will run for free for 30 days, so you could easily do that (if you have a spare external drive).

You might then try deleting your iTunes folder and copying your backup to the Music folder, then see if that fixes it (but be sure iTunes is not running when you try). Perhaps a safer approach would be to leave everything alone for starters, then connect your external disk with the backup, start iTunes and go to Preferences > Advanced and change the iTunes media folder location to the copy of that folder on your external disk. That should let you test the backup copy and see if it works correctly. Of course, it also has the potential to corrupt your backup copy - which is why you need a backup of the backup!

If that seems to fix things, you could then set this preference back to the default location on your internal disk, quit iTunes and then replace the internal folder with your backup copy. But again... proceed at your own risk, and I definitely wouldn't attempt any of this unless I had good backup copies of both the old hard drive and the new hard drive.

Really, this points to the importance of having a good backup strategy. Time machine is fine, but not a very good substitute for a clone. Time machine backups must be restored, which is a very slow process. It is much easier to restore from a clone, and you can also boot directly from a clone on an external disk.
[doublepost=1547571093][/doublepost]BTW, you could also try posting to this forum. There are usually some very knowledgeable people there, and they might suggest a different approach.

https://forums.macrumors.com/forums/apple-tv-and-home-theater.100/
 
  • Like
Reactions: Sammy's
You should be able to grab any old files from time machine by clicking the little clock icon in the toolbar and selecting "enter time machine". I find it hard to suggest any course of action, since I don't understand exactly how the problem occurred - and I won't have to live with the results like you will if you mess it up. ;)

Personally, I would have cloned the disk before doing anything, as I suggested above. Of course it's too late for that now, but I would still make a clone of disk in its present state, so you can always at least get back to that. Carbon Copy Cloner will run for free for 30 days, so you could easily do that (if you have a spare external drive).

You might then try deleting your iTunes folder and copying your backup to the Music folder, then see if that fixes it (but be sure iTunes is not running when you try). Perhaps a safer approach would be to leave everything alone for starters, then connect your external disk with the backup, start iTunes and go to Preferences > Advanced and change the iTunes media folder location to the copy of that folder on your external disk. That should let you test the backup copy and see if it works correctly. Of course, it also has the potential to corrupt your backup copy - which is why you need a backup of the backup!

If that seems to fix things, you could then set this preference back to the default location on your internal disk, quit iTunes and then replace the internal folder with your backup copy. But again... proceed at your own risk, and I definitely wouldn't attempt any of this unless I had good backup copies of both the old hard drive and the new hard drive.

Really, this points to the importance of having a good backup strategy. Time machine is fine, but not a very good substitute for a clone. Time machine backups must be restored, which is a very slow process. It is much easier to restore from a clone, and you can also boot directly from a clone on an external disk.
[doublepost=1547571093][/doublepost]BTW, you could also try posting to this forum. There are usually some very knowledgeable people there, and they might suggest a different approach.

https://forums.macrumors.com/forums/apple-tv-and-home-theater.100/

Thanks - I'll repost over there and then give it a go!
 
If your playlists are still there in any copy, the lists themselves, not the tracks, export them all.
I think Doug's AppleScripts for iTunes has a mass exporter, so it's not a lot of work.
That'll help a lot if you have to rebuild from a damaged library.
If it gets to the point that you have to re-add your tracks from scratch, don't go over 1000 tracks at a time or so. The number may vary with the Mac and iTunes version, but iTunes can choke if you ask it to add too many at a time.

If the itl you have is clearly wrong. Drag it out of the iTunes folder, and copy the most recent, or next most recent itl into the iTunes folder. Rename it "iTunes Library.itl" If you get the right file, it should move your library back to just before catastrophe hit. Be sure to check that any recent additions to the library show up. If they don't, you can just drag the music files out onto the desktop and re-add. That'll cost you play-count, hearts and stars, but you'll get the music back
 
  • Like
Reactions: Sammy's
You should be able to grab any old files from time machine by clicking the little clock icon in the toolbar and selecting "enter time machine". I find it hard to suggest any course of action, since I don't understand exactly how the problem occurred - and I won't have to live with the results like you will if you mess it up. ;)

Personally, I would have cloned the disk before doing anything, as I suggested above. Of course it's too late for that now, but I would still make a clone of disk in its present state, so you can always at least get back to that. Carbon Copy Cloner will run for free for 30 days, so you could easily do that (if you have a spare external drive).

You might then try deleting your iTunes folder and copying your backup to the Music folder, then see if that fixes it (but be sure iTunes is not running when you try). Perhaps a safer approach would be to leave everything alone for starters, then connect your external disk with the backup, start iTunes and go to Preferences > Advanced and change the iTunes media folder location to the copy of that folder on your external disk. That should let you test the backup copy and see if it works correctly. Of course, it also has the potential to corrupt your backup copy - which is why you need a backup of the backup!

If that seems to fix things, you could then set this preference back to the default location on your internal disk, quit iTunes and then replace the internal folder with your backup copy. But again... proceed at your own risk, and I definitely wouldn't attempt any of this unless I had good backup copies of both the old hard drive and the new hard drive.

Really, this points to the importance of having a good backup strategy. Time machine is fine, but not a very good substitute for a clone. Time machine backups must be restored, which is a very slow process. It is much easier to restore from a clone, and you can also boot directly from a clone on an external disk.
[doublepost=1547571093][/doublepost]BTW, you could also try posting to this forum. There are usually some very knowledgeable people there, and they might suggest a different approach.

https://forums.macrumors.com/forums/apple-tv-and-home-theater.100/

I grabbed an enclosure and hooked up the old HD - I found two iTunes folders on there. I think this might be part of the problem. Is there a way to merge these two and the restore iTunes?
 
Ended up using the enclosure to grab the different folders and was able to merge them. All the music is intact but the most current playlists are gone - my best guess is because they were created in iTunes 12.7 but after I swapped the hard drives iTunes has reverted to 12.6.3 and won't allow those files to open.

Thanks for all the good advice!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.