Currently Being ModeratedMar 26, 2013 10:54 AM (in response to sky1415)
I'd start with the largest of the .tmp files as the best candiate file to rename as iTunes Library.itl - try the other files systematically until you find one that represents your library as you expect it...
Empty/corrupt library after upgrade/crash
Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. Note that in iTunes 11 an "empty" library may show your past purchases with links to stream or download them.
In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
Alternatively, depending on exactly when and why the library went missing, there may be a more recent .tmp file in the main iTunes folder that can be renamed as iTunes Library.itl to restore the library to a recent state.
See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
When you get it all working make a backup!
Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device.
I've noticed more of these missing library posts of late and a common factor to most since I started asking is AVG Anti-Virus. It seems in some cases it might be at least part of the reason why the library file disappears. Try excluding the iTunes folder from any AV scanning process.
Currently Being ModeratedMar 26, 2013 10:09 PM (in response to sky1415)
I spent 4 hours (and $20) on the phone with Apple regarding this. They could not help me. I keep having to save my library file, and then re-install it ever 3 or 4 days. It is really annoying.
Currently Being ModeratedMar 28, 2013 4:35 AM (in response to sky1415)
I had exactly the same problem and once I excluded the iTunes folder from the AVG realtime scanner it was solved. I recreated the iTunes library fairly easily by readding the music folders to the library.
Hope this helps.
Currently Being ModeratedMar 28, 2013 10:37 AM (in response to tomfromripon)
Very similiar problem, I excluded iTunes in AVG and I'm still losing my library every morning between 3:30 & 4:00 AM. In fact, AVG only runs 3 times per week but my library resets/disappears every morning at the same time. I looked in Event Viewer and the only thing that happens on my machine at that time is that Microsoft Security Service runs. Driving me nuts. Going to disable the service, reload my library from a *.tmp & see what happens.
Currently Being ModeratedMar 28, 2013 1:44 PM (in response to turingtest2)
I'm not running Microsoft Security Essentials, just AVG, I may have the name wrong as I am at work and can't give you the exact name of the service but it runs at the same time the library problem is happening. iTunes was not running this morning when it happened.
I'm going to check my updates in control panel tonight and see when the last time the service (whatever the correct name is) received an update.
Currently Being ModeratedMar 28, 2013 2:02 PM (in response to Koppster)
OK. If you get a chance to look at that event log again it might be nice to know exactly what was running. Do you know if that's when the library went missing, or just that it happened overnight? AVG seems to be a common factor for many, but I can't say for certain that is the cause of this recent spate of missing libraries. There may be other potential triggers and it could quite well need a number of factors in place before something actually goes wrong.
Currently Being ModeratedMar 28, 2013 3:09 PM (in response to tomfromripon)
I have been reading some more of the thread and I thought I should just mention that I have been using AVG for many years without issue. It wasn't until an upgrade last night that I started seeing this problem.
Currently Being ModeratedMar 28, 2013 6:26 PM (in response to sky1415)
Thank you to all who are helping, especially TuringTest2. I have turned off the AVG scan for my iTune files. I hope I did it correctly. It didn't work through my control panel as mentioned above. I had to go into AVG. We'll see. I was able to re-assemble my iTunes by renaming a .tmp file as Tunes Library.itl (Why didn't the Apple people tell me to do that?) Before that, when I tried to re-install previous libraries, my computer would rename them as damaged, including the backups I had made, and they didn't have half my stuff (Ring tones, podcasts, playlists, etc.) I think this was because I hadn't deleted all the extraneous iTunes files.
I will repost if turning off AVG scanning works. In the meantime, I have made a backup .
Thank you all for your help!
Currently Being ModeratedMar 29, 2013 1:15 AM (in response to turingtest2)
The name of the service that runs every morning at/about the time my library disappears is Software Protection Services.
I'm not ruling AVG out because a major update was issued the day this problem started. However, AVG does not run everyday on my system (ony 3 days per week) whereas the issue does occur everday. And, my son's computer runs AVG and was updated on the same day but he is not having the issue.
Monitoring events and experimenting.
Currently Being ModeratedMar 29, 2013 2:39 AM (in response to Koppster)
Well, at least it is consistent, lost my library again this morning between 3:30 & 4:00 AM.
AVG did not run a scan but the history shows it stopped and started at about 3:00 AM, that's about the time I checked email so it would have started to check email.
Event Viewer shows that Software Protection Services ran between 3 & 3:30 AM.
I'm really lost on this.
Currently Being ModeratedMar 29, 2013 3:15 AM (in response to Koppster)
My best guess is that the library deletion is not caused by routine scans but a hiccup in the filing system. Each time iTunes updates the database it appears to create a new temporary file, deletes the original, and renames the temporary file as iTunes Library.itl. AV usually works by intercepting all file operations and stalling them while the target file is checked for problems, allowing the process to complete if none are found. I think what happens is that iTunes deletes the original .itl, then calls on the OS to rename the temporary file and carries on. The operation gets held up and then, perhaps becuase iTunes doesn't check on it, it never completes. Next thing you know, empty library... That's my assumption anyway.
More Like This
- Retrieving data ...
- This solved my question - 10 points
- This helped me - 5 points