Author Topic: Entire library deleted  (Read 605 times)

nugget720

  • Newbie
  • *
  • Posts: 9
I have my music files on a SMB network share. Today my Wi-Fi connection to my NAS was having a couple dropouts when suddenly all the files in my MusicBee library disappeared and in the bottom left corner it read "xxx.xxx files removed from library". I suppose me losing connection to the network share somehow signaled to MusicBee that there are no files instead of a connection issue. After waiting for MusicBee to re-add all the files to the library, I found that it had lost all statistics.

Is there any way to revert the library to the previous state which has all my statistics (play count, track rating)?
How can I prevent this from happening again?
Last Edit: July 21, 2022, 05:27:25 PM by nugget720

frankz

  • Sr. Member
  • ****
  • Posts: 3834
Q1: You should have a file named the same as your library file with a .bak extension in the library folder. Assuming you haven't closed and opened MB since the incident, this will be the library as it existed before.  If you have closed and opened MB since the incident, you'll have to rely on your system backup.
Q2: Don't monitor folders for changes (Edit->Edit Preferences->Library...Monitored Folders) if you don't want those folders monitored. Update your library manually.

nugget720

  • Newbie
  • *
  • Posts: 9
Q1: You should have a file named the same as your library file with a .bak extension in the library folder. Assuming you haven't closed and opened MB since the incident, this will be the library as it existed before.  If you have closed and opened MB since the incident, you'll have to rely on your system backup.
Q2: Don't monitor folders for changes (Edit->Edit Preferences->Library...Monitored Folders) if you don't want those folders monitored. Update your library manually.
Thank your for your response and the hint about the .bak file. It's not a big problem because I am lucky to have made a backup only three weeks ago. For the around 2000 new files I was able to guesstimate the stats and add them manually and the library is fine now.

It would also be nice if these situations could be prevented, for example by requiring user confirmation before applying changes that affect a huge chunk of the library, but I know that something like that is difficult to implement because you have to make sure not to put the database in an inconsistent state. Monitoring folders is evidently not safe with the current implementation, it's way to easy to lose your library. : ( I'm going to scan manually from now on but that might also not solve the issue because the folder could still drop out while scanning and it would again delete my library.
Last Edit: July 21, 2022, 07:27:06 PM by nugget720

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
MB does make the distinction between files not existing and files not being accessible because the device is not ready, so i am surprised the files were removed from the library.
I suggest updating to the latest patch version:
https://getmusicbee.com/patches/MusicBee35_Patched.zip
unzip and replace the existing musicbee application files

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
It would also be nice if these situations could be prevented, for example by requiring user confirmation before applying changes that affect a huge chunk of the library

There's a setting in General Preferences, "confirm removal of dead links when rescanning library." Do you have that enabled? If it was enabled when this happened, maybe it needs a review, because I would expect that to prevent any accidental removals.
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)