Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Database Disk Image is Malformed

Featured Replies

Hi just got this error after update 7 unraid and Jellyfin any idea on repair?

 

[12:01:44] [ERR] [34] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL GET /UserViews.
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 11: 'database disk image is malformed'.

 

Thanks upfront

@cattledog I know there are ways to repair SQLite db's that have been mentioned previously on this thread but I don't know of anything specific to Jellyfin. Best case would be to restore from a recent backup if possible.

 

I actually just had this issue come back again in Sonarr this morning after quite a few months of no issues. I don't believe it's related to the Appdata Backup or the CA Auto Update Applications plugins. Those are scheduled and run at completely different times of the week that don't match up (at all) with when this latest corruption occurred.

 

I see old forum posts talking about the Direct IO tunable and another thread mentioning the mdcmd set md_restrict 1 command but I think that fix was already rolled into a previous Unraid version. Not real sure where to go from here. Doesn't seem to be any end in sight.

 

Unraid version: 6.12.14

Sonarr container: lscr.io/linuxserver/sonarr

My restores seem to fail I believe that cause with the update of jellyfin your restore has to be same ver as up date I am happy to uninstall jellyfin and reinstall will that rebuild database?

I don't know all that much about Jellyfin. I run the container but don't use it.

 

Doing some googling I found this post here that talks about repairing a corrupt DB. Sorry I can't be of more help.

Cheers will have a read 

  • 2 weeks later...

Just to update this thread, its been 5 weeks and it hasn't corrupted again since the update to v7.

This is by far the longest its gone since corrupting - fingers crossed its cured it. Hopefully either the update itself has fixed it, or the act of updating has done something to fix it. I'll report back in the future!

  • 2 months later...

So I found that my database for radarr has been corrupting often with a malformation error. I've read all the threads about this and have done a lot of research. Although, i can't say what's causing it. I can tell you a possible solution and it does not involve with starting from scratch. In my case I tried to reload an older backup but it was corrupt too. I thought for certain I needed to start from scratch. Here is what I did and it fixed my database.

 

1 Stop program that is corrupted. Ie radarr

2 install on a windows box sql brower lite

3 copy in my case radarr.db to the windows box

4. open database inside brower software

5. export database under file complete in sql format under a different file name.

6 click on new and put in new database name radarr2.db

7 GO to import and import the sql document into the radarr2.db

8 save file after import is done

9 exit browser software

10 del radarr.db

11 rename radarr2.db to radarr.db

12 copy database radarr.db back to your radarr directly and replace the old radarr.db file

13 restart radarr

14 problem should be fixed. Your radarr will rescan disk and find missing items and import them. You should be good to go

 

enjoy

4 hours ago, gvtci said:

So I found that my database for radarr has been corrupting often with a malformation error. I've read all the threads about this and have done a lot of research. Although, i can't say what's causing it. I can tell you a possible solution and it does not involve with starting from scratch. In my case I tried to reload an older backup but it was corrupt too. I thought for certain I needed to start from scratch. Here is what I did and it fixed my database.

 

1 Stop program that is corrupted. Ie radarr

2 install on a windows box sql brower lite

3 copy in my case radarr.db to the windows box

4. open database inside brower software

5. export database under file complete in sql format under a different file name.

6 click on new and put in new database name radarr2.db

7 GO to import and import the sql document into the radarr2.db

8 save file after import is done

9 exit browser software

10 del radarr.db

11 rename radarr2.db to radarr.db

12 copy database radarr.db back to your radarr directly and replace the old radarr.db file

13 restart radarr

14 problem should be fixed. Your radarr will rescan disk and find missing items and import them. You should be good to go

 

enjoy

Isn't that what we have all been doing with the repair commands? Legit question, because I don't know if your method does something else. After repair, *arr is working fine for weeks, sometime months, before it gets corrupted again.

I tried gvtci's fix on my Sonarr db a few days ago and so far so good. Really high hopes that this is the end of this longstanding headache.

 

Even if it doesn't turn out to be a lasting fix, it still seems to me like a better solution than restoring from backup.

 

Thanks for the tip

I recently encountered the same issue with a malformed database disk image in Radarr. After some trial and error, I built upon a script originally posted by rhinot (Special thanks to rhinot for the original script) that is able to repair the Radarr DB. I've shared this script in my GitHub repository, and I hope it can help others facing the same problem.

 

https://github.com/itmunky/ScriptStash/tree/main/Radarr#description
Script: https://github.com/itmunky/ScriptStash/blob/main/Radarr/improved_radarr_recovery.sh

image.thumb.png.b9f53c65e38afd618a659d94ff2f25a6.png

  • 2 weeks later...
On 4/29/2025 at 2:53 PM, Stampy said:

I recently encountered the same issue with a malformed database disk image in Radarr. After some trial and error, I built upon a script originally posted by rhinot (Special thanks to rhinot for the original script) that is able to repair the Radarr DB. I've shared this script in my GitHub repository, and I hope it can help others facing the same problem.

 

https://github.com/itmunky/ScriptStash/tree/main/Radarr#description
Script: https://github.com/itmunky/ScriptStash/blob/main/Radarr/improved_radarr_recovery.sh
 

 

This worked great.

On 4/29/2025 at 12:53 PM, Stampy said:

I recently encountered the same issue with a malformed database disk image in Radarr. After some trial and error, I built upon a script originally posted by rhinot (Special thanks to rhinot for the original script) that is able to repair the Radarr DB. I've shared this script in my GitHub repository, and I hope it can help others facing the same problem.

 

https://github.com/itmunky/ScriptStash/tree/main/Radarr#description
Script: https://github.com/itmunky/ScriptStash/blob/main/Radarr/improved_radarr_recovery.sh

 

This script from @Stampy worked perfectly! I tried the simple .recover command suggested around and it didn't fix my db errors but this script did!

 

10/10 would recommend 

Glad it is getting some use and working! 

On 4/29/2025 at 2:53 PM, Stampy said:

I recently encountered the same issue with a malformed database disk image in Radarr. After some trial and error, I built upon a script originally posted by rhinot (Special thanks to rhinot for the original script) that is able to repair the Radarr DB. I've shared this script in my GitHub repository, and I hope it can help others facing the same problem.

 

https://github.com/itmunky/ScriptStash/tree/main/Radarr#description
Script: https://github.com/itmunky/ScriptStash/blob/main/Radarr/improved_radarr_recovery.sh
 

I'm curious - why do it like this instead of the sqlite built-in recover command as suggested on the *arr wiki: https://wiki.servarr.com/useful-tools#recovering-a-corrupt-db

I've used the recover command successfully in the past and wondering if I'm missing something. It's also very fast (seconds).

15 hours ago, PISTOL_CUPCAKES said:

I'm curious - why do it like this instead of the sqlite built-in recover command

 

 

On 5/15/2025 at 10:35 PM, Bobodia said:

I tried the simple .recover command suggested around and it didn't fix my db errors but this script did!

 

 

Just came back to say it's been almost a month and no corruption to be seen. I see another potential fix has been posted since, but thank you gvtci for the fix, worked great.

  • 1 month later...

@Stampy is the script you made also applicable for the other arr's? Or only for Radarr?

  • 3 weeks later...
On 4/29/2025 at 7:53 PM, Stampy said:

I recently encountered the same issue with a malformed database disk image in Radarr. After some trial and error, I built upon a script originally posted by rhinot (Special thanks to rhinot for the original script) that is able to repair the Radarr DB. I've shared this script in my GitHub repository, and I hope it can help others facing the same problem.

 

https://github.com/itmunky/ScriptStash/tree/main/Radarr#description
Script: https://github.com/itmunky/ScriptStash/blob/main/Radarr/improved_radarr_recovery.sh

image.png

This worked perfectly for me, thank you! I had noticed that Radarr's Acitvity > History wasn't updating with new events following a restore I made last week. Found the logging containing 'Database disk image is malformed' and found my way here after about 10 minutes of searching. Your script worked first time - my existing history is there still and new events are being added as you'd hope. I'm on Unraid 6.12.13 in case anybody happens to care when finding this post later on

  • 2 months later...
On 4/29/2025 at 7:53 PM, Stampy said:

I recently encountered the same issue with a malformed database disk image in Radarr. After some trial and error, I built upon a script originally posted by rhinot (Special thanks to rhinot for the original script) that is able to repair the Radarr DB. I've shared this script in my GitHub repository, and I hope it can help others facing the same problem.

 

https://github.com/itmunky/ScriptStash/tree/main/Radarr#description
Script: https://github.com/itmunky/ScriptStash/blob/main/Radarr/improved_radarr_recovery.sh

image.thumb.png.b9f53c65e38afd618a659d94ff2f25a6.png

Tried running this not sure if im doing it correctly, it outputs the following.

Found radarr.db. Attempting to rebuild...

Analyzing database structure...

Empty database. Unable to restore.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.