Corrupted database

Get answers about the current version of MediaMonkey 5

Moderator: Gurus

darich
Posts: 15
Joined: Mon Oct 12, 2020 7:57 am

Corrupted database

Post by darich »

I was listening to music and MM5 crashed. I tried restarting it and I get this message

"Library database C:/users/.......can't be opened. Would you like to create a new local library?
error executing sql pragma synchronous=database disk image is malformed (11,11)"

If I say no, then MM5 does not start. Another window pops up "Application error" and some other text
If I say yes, then it starts creating a new databse with no playlists and no play counts.

My database is stored on my local F drive which is synchronised to my NAS so I always have a copy of the database.

Is there anyway of recovering my database along with my playlists and play counts?

Thanks
Rob_S
Posts: 885
Joined: Wed Mar 10, 2021 1:53 pm

Re: Corrupted database

Post by Rob_S »

Ouch. Please post what exact build number you are currently using??

First, check and see if automatic database backups was enabled. Look in C:\Users\__username__\AppData\Roaming\MediaMonkey5 for any .db or .db.bak files. I would make a file-copy backup of your current database in case better methods are discovered.

How recently did you migrate from MM4? If you still have it, you could copy over the database from MM4, and then re-scan for new tracks. I believe you can simply copy the db over the damaged one. Again, copy existing first.

If not, and if you have synced to a device, you could sync reverse and recover whatever playlists exist on the device. Exact procedure would need to be confirmed.

For the devs, why is periodic database backup not enabled by default?

For anyone with a big database, you really must turn this on, and have the backup placed in a folder that is backed up externally as well. By default it is filed in the same appdata folder.
Using 5.1 LATEST alpha or beta build on Windows 10, HP laptop, managing 13k tracks
darich
Posts: 15
Joined: Mon Oct 12, 2020 7:57 am

Re: Corrupted database

Post by darich »

Thanks Rob

I'm on version 5.03.2627 and Windows 11

Auto backup is/was enabled.
I checked the file location you mentioned. In there, is MM5.DB (29mb) which is the databse MM5 has reconstructed because the original corrupted. There's also one called MM5.DB.corrupted (47.8mb). I had set the location of the backup to be my F drive and backed up monthly but, with hindsight maybe wasn't clever because that was also the database MM5 was set to use. So the back up doesn't appear to be anywhere...it's just that single database that I had set MM5 to read by changing the .ini file.

I moved from MM4 ages ago.....easily over 12months. I have no trace of MM4 on my machine at all now. I haven't synced to any other device.

I've tried restoring the database from the backup but as above, it appears that the only version is the corrupted one, so restoring simply causes MM5 to crash or freeze up.

Thankfully, no music has been lost....just the playlists and play counts.

Thanks again
Lowlander
Posts: 56628
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Corrupted database

Post by Lowlander »

Make sure you use the build in backup to have several copies so you can go back in time: https://www.mediamonkey.com/wiki/WebHel ... y_Database

You can have it backup directly to the NAS or have it backed up locally and then backup to the NAS using your regular backup (for extra redundancy).

You could try a search for mm5.db and mm.db on your whole system and NAS to see if there are any more recent copies available.


Unfortunately there is nothing to do about a malformed database: https://www.mediamonkey.com/support/kno ... malformed/
Rob_S
Posts: 885
Joined: Wed Mar 10, 2021 1:53 pm

Re: Corrupted database

Post by Rob_S »

It sure does not make much sense to allow auto-backups to simply overwrite the original file.

It should create additional numbered files called something like .db1 .db2 or .db.bak1, .db.bak2 etc

Also, ideally the backups should default to at least a subfolder of the selected folder, named backups.

I hope they look at this and make some improvements to this part of the program.

ps Lowlander has some good points!!
Using 5.1 LATEST alpha or beta build on Windows 10, HP laptop, managing 13k tracks
Lowlander
Posts: 56628
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Corrupted database

Post by Lowlander »

MediaMonkey already does this. It creates backups with the date in the filename and you can set where the backups are to be stored and how many should be kept.
Rob_S
Posts: 885
Joined: Wed Mar 10, 2021 1:53 pm

Re: Corrupted database

Post by Rob_S »

My apologies regarding the naming of backup files, I see indeed that it already does that for me - confirmed.

I was going by the statement above he had auto-backup enabled and did not find any sequential files.

I did not have auto-backup enabled, and had not made any backups within the program.

I have very few playlists, and all my track info is saved to tags, so very easy to restore by re-scanning.
Using 5.1 LATEST alpha or beta build on Windows 10, HP laptop, managing 13k tracks
darich
Posts: 15
Joined: Mon Oct 12, 2020 7:57 am

Re: Corrupted database

Post by darich »

Thanks for the replies.

I'll have a search on my entire networked system for any other databases.
And although I appear to have set the back up to be in the same location as the original, if they're suffixed with the date of back up, then they're not there.... They're somewhere else. There are no files with a date added to the end.

Thankfully it's just playlists that are gone along with track play counts. The music itself is still there and plays fine after MM5 creates a new database.

I'll have a thorough search and fingers crossed I find a backup I can restore.

Thanks again.
darich
Posts: 15
Joined: Mon Oct 12, 2020 7:57 am

Re: Corrupted database

Post by darich »

Just posting to confirm that MM5 has created no back ups with the date appended, despite me having the auto back up checked and settting it to retain 2 copies.
Peke
Posts: 17493
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Corrupted database

Post by Peke »

Rob_S wrote: Fri Jul 22, 2022 2:56 pm Also, ideally the backups should default to at least a subfolder of the selected folder, named backups.
I hope they look at this and make some improvements to this part of the program.
Hmmm, Not sure I would like as my Library is 1.4GB :) There is number on To-Do bugs for improvements.

I still prefer Manual backup, whenever I want.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Barry4679
Posts: 2429
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: Corrupted database

Post by Barry4679 »

Peke wrote: Sat Jul 23, 2022 6:22 amHmmm, Not sure I would like as my Library is 1.4GB :) There is number on To-Do bugs for improvements.

I still prefer Manual backup, whenever I want.
You mean your Collection is 1.45gb? ... if so, your database will be much smaller.
I have 50,000 tracks, and my database is only 145mb.
This is compacted to 127mb when it is backed up.

If your actual database is 1.45gb, you must have something like 500,000 tracks ? ... there must be a medical name for someone like that :D

Having multiple backup copies is a flyspeck in computer terms ... and MM5 can auto housekeep it down to just n copies.

IMO Manual backups suck.
MM5 should default to have backups set on, with the housekeeping set to retain something small, like 3 or 5 copies.

The current default has cost darich all his play count history, and his playlists too.

You good with that?
Want a dark skin for MM5? This is the one that works best for me .. elegant, compact & clear.
Rob_S
Posts: 885
Joined: Wed Mar 10, 2021 1:53 pm

Re: Corrupted database

Post by Rob_S »

I agree with that, and in spite of some confusion in my earlier postings, it seems to me autobackup should be enabled by default, and I also think the backups should appear somewhere people who do not have "show hidden files" enabled can still find them. Maybe a setting that must be chosen upon installation??

Can anyone who has had autobackup enabled confirm that it actually produced a series of dated .db files, contrary to OP post above??

Also, can anyone confirm if the original database does become corrupted, will the program offer to reload last previous backup, from users designated backup path?

Backups are important, particularly since the database contains basically all the "work and effort" the user has put into this program, and knowing that it can become irretrievably corrupted.

I think for some reason peke above was thinking of backing up his Library of tracks, which is a whole separate issue. It would not be unreasonable for the program to have such a feature built into it.
Using 5.1 LATEST alpha or beta build on Windows 10, HP laptop, managing 13k tracks
Lowlander
Posts: 56628
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Corrupted database

Post by Lowlander »

Yes, it creates dated backups and you can restore from backup under Tools > Options > Manage database.
Peke
Posts: 17493
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Corrupted database

Post by Peke »

Barry4679 wrote: Sat Jul 23, 2022 8:19 am If your actual database is 1.45gb, you must have something like 500,000 tracks ? ... there must be a medical name for someone like that
206k to be precise. Library file size really depends on amount of metadata it contain and index size especially text/string index. Yes there is a name for such person, serious collector and DJ (for me better to say ex-DJ). But then I have <10 Movies in collection. NOTE that I worked on several radio stations and on building their archives, so in most cases I got their CDs and have backup of their library ;)
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Rob_S
Posts: 885
Joined: Wed Mar 10, 2021 1:53 pm

Re: Corrupted database

Post by Rob_S »

Lowlander wrote: Sat Jul 23, 2022 2:47 pm Yes, it creates dated backups and you can restore from backup under Tools > Options > Manage database.
This does not explain why OP can't find any backups existing? Is it because his files are on the NAS?
"Library database C:/users/.......can't be opened. Would you like to create a new local library?
error executing sql pragma synchronous=database disk image is malformed (11,11)"

If I say no, then MM5 does not start. Another window pops up "Application error" and some other text
If I say yes, then it starts creating a new databse with no playlists and no play counts.
And for Darich, as above if you were let it load, and let it create new library, and then try to restore, does it offer to restore, or what happens???

Also, what happens if you attempt a manual backup - does a dated .db file then appear someplace??
Using 5.1 LATEST alpha or beta build on Windows 10, HP laptop, managing 13k tracks
Post Reply