Author Topic: Data lost in database  (Read 316 times)

july60

  • Newbie
  • *
  • Posts: 12
I wanted to store the catalog number of CD's and created a custom tag 'Catalog number' stored in Musicbee database only.
Today I noticed many were missing.
I defined a new custom tag 'Catalog Number'. It took a while for the whole 71.000 files to process,
only to find out that all catalogue numbers are now missing.
Is there a way to retrieve them? Greatful for any help..
Last Edit: June 24, 2025, 04:23:54 PM by july60

july60

  • Newbie
  • *
  • Posts: 12
Update:
Many catalog numbers were restored by replacing the current .MBL with a backup.
However, how can I save them as metadata in the music file without again loosing them all?

tjinc

  • Sr. Member
  • ****
  • Posts: 840
I have always found the MusicBee library database to be remarkably robust so I am not sure what might have happened for you to have lost this data - I can't say that I have ever lost any. But this does highlight the benefit of maintaining up-to-date backups!

As regards saving custom data to files - take a look at this post to see if you can gain an insight in how to proceed (but do ask again if you don't get anywhere):
Creating Custom Tags

karbock

  • Sr. Member
  • ****
  • Posts: 565
I've just performed a test here, to be sure.
The transfer must be done in several steps.

===

First, let me just rephrase what you've tried so far (at least, what I've understood, so please correct what is not accurate).

Situation 1
* 'Catalog number' was stored in MB database only.

Situation 2
* You created (via Preferences -> Tags (1) -> [Define New Tags...]) a new custom tag named 'Catalog number'
* In Preferences -> Tags (1) -> custom tags, for 'Catalog number, you switched from 'Save to MusicBee database only' to 'Catalog number', and save.
=> MB automatically rescanned your entire collection and wiped 'Catalog number' in its database for all the tracks.

====

Now, what you must do (tested here with success).

Make sure you start again from Situation 1 (after restoring the correct .MBL).
Make sure that plugin "Additional Tagging & Reporting Tools" is installed.

Steps:
(1) In Preferences -> Tags (1) -> custom tags,
rename 'Catalog number' to 'Catalog number OLD'

(2) In Preferences -> Tags (1) -> [Define New Tags],
define a new custom Tag named 'Catalog number', and  [Save].

(3) In Preferences -> Tags (1) -> custom tags, in a free slot,
set:
display name = Catalog number
save to music file as tag = Catalog number

(4) Make tags 'Catalog number OLD' and 'Catalog number' visible in the current view (Album & Tracks, or Tracks)

Then, perform a test with a few tracks:
(5) MusicBee Main menu -> Tools -> Additional Tagging & Reporting Tools -> Copy Tag...
copy tag Catalog number OLD to tag Catalog number,
and [proceed]. (You may have to close the window when done, if it doesn't close automatically.)

(6) With the selected tracks, right-click -> Send to -> File rescan
to refresh the display => now, you must see the same values in Catalog number OLD and Catalog number.

(7) If it's OK, you can do the same for all the tracks.

(8) Then, you can wipe Catalog number OLD.

july60

  • Newbie
  • *
  • Posts: 12
Thanks to both of you. I must say that this is the second time I had a database glitch with the catalog numbers. Not funny with such a huge collection.

I can confirm the steps outlined in situation 1 & 2.
I'll try the proposed solution tomorrow.

sveakul

  • Hero Member
  • *****
  • Posts: 3285
I've just performed a test here, to be sure.
The transfer must be done in several steps...
Dang!  Karbock, I want you on MY side!  Genius, man.

july60

  • Newbie
  • *
  • Posts: 12
Worked like a charm, I no longer have to fear losing the catalog numbers.
Hope the database behaves now.
Thanks a lot.

karbock

  • Sr. Member
  • ****
  • Posts: 565
@july60: thanks for your feedback!

@sveakul:

When was my last contribution to 'Tips & Tricks' again? I think I have material for the next post.