This is a bit of a lesson to myself on how iTunes is set up and the bizzareness of it all.
I was at a client’s to fix their laptop that was running sluggish and on which skype was refusing to work on. On inspection, I found that the primary partition was running seriously low on space and as such the file system was incredibly fragmented.
A quick scan with treesize showed the the majority of the hard drive space was being used up by the client’s music in iTunes. Luckily the hard drive was partitioned into two drives and the seccond partition was practically empty and had ample space if I was to move the mucus across to it.
Firing up iTunes, I went into the settings and told the program to use a folder on the second partition as the primary store for the music. After applying the settings, nothing happened an the mucsic was still on the primary partition. Digging a little deeper, I found that I needed to tell iTunes to we catalog it’s music and it would then move the music across to the new location – the. All I would need to do is delete the music from the old location under my music.
After about 40 mins, the music had finished copying across so I went ahead and deleted the iTunes folder in my music, emptied the recycle bin and started a full defrag of the system drive using myDefrag.
This is where my mistake was – instead of deleting just the music, I had accidently deleted the iTunes database as well, meaning that all of the client’s playlists and purchased songs list was lost. Add to the fact that a full defrag had taken place, there was no way that I was going to be able to recover the files with an undelete utility. Bugger!
Luckily, I was able to rebuild the libarary by adding the moved files back into iTunes and then syncing the client’s iPhone and iPod with iTunes to recreate the playlists. Enven the purchased songs were playable though they were not showing up in their own little playlist. The client was happy with the results, I got his laptop up to normal speed and most importantly got skype running.
The moral of the story?
Do not delete everything from the iTunes folder if moving your music and always take a backup of the database first. Pretty common sense really, but even us IT guys slip up once in a while!