Solved KODI Database Corruption?
#1
A long question for a confusing problem.

Windows 10 x64, Kodi 18.1
I may not be an expert with KODI, but I've been using it since Eden, so I've learned a few tricks to solve problems, but this one has me stumped.

I had a working 17.6 system which I upgraded to 18.1 a couple of weeks ago. Everything worked fine. I might mention that I keep all of my movies in their own folders on separate data drives. No RAID involved.

Yesterday I created a new Windows parent folder on one of my data drives. (The new folder was still included in the existing Source location.) I moved two movies (with their folders) into that folder. I also added a new movie. So, new folder, three movies. Update library, then run a clean operation. A piece of cake.

KODI did not see one of the moved files. I ran update again but no luck. I moved that movie to another drive that was not in the source path and re-ran Update Library. I moved it back with no luck.

I moved all three of the movies back in their original location. Now the two movies that had been moved appeared but the newly added one did not. At this point I noticed that a lot of movies ( (maybe 70 or 80)) were missing from the KODI library, all from this drive.

I tried copying some files (in Windows) to this drive and got some failures. I did a chkdsk on the drive and it was reported error-free. I ran some other check utilities but a few of them reported unnamed problems. So it appeared there might be a problem with a corrupted disk or corrupted files, even though the missing files played fine in VLC and MPC. Luckily, I keep a master copy of all my data files, and I also had a backup of the KODI database (as well as the metadata files from the individual movie folders) from a weeks earlier. I also had a spare 8TB drive, so I created a fresh copy of the suspect disk from the master and metadata files. No luck.

So I'm at the stage where I want to restore the KODI database. The question I have is should I do an Import using the KODI backup from a week ago, or use a restore from my backup program, which has the entire KODI folder (as well as the AppData folder for KODI)? I'm leaning to the complete backup, since the problem is confusing enough. Should I include both the KODI folder and the AppData entries for KODI? And finally, should I restore to the previous version (17.6), although that backup is about 6 weeks old?

Any suggestions would be appreciated.
Reply
#2
It appears you may have a drive that has some corrupt table, or perhaps some disk re-allocation issue. The entire hard drive and it's contents are at risk. Best case would be to pull everything off and format and test until you're satisfied (if you have a spare, now is the time for the swap), you can always keep the suspect drive as the treasured back-up or RMA if you're within the window. You didn't mention if you export to separate files, and then the meta-data & images would be available for a local quick scrape. If your back-ups are Kodi 17.6, revert to that install then progress to Leia from that point. Question how full is the drive, I would pull the files off asap.
Reply
#3
(2019-04-07, 05:08)hurricane51 Wrote: should I do an Import using the KODI backup from a week ago, or use a restore from my backup program
Not willing to answer without more info of your setup. If you use minimal add-ons, I personally would start fresh, and import your library. I am assuming here you mean a Single File Export of your Video and/or Music Library.

Fresh is best. It will get rid of the crud that could be causing issues.

If you are not talking about a Single File Export, then tsk, tsk tsk. You should export your library and use it as your backup.

(2019-04-07, 05:08)hurricane51 Wrote: Should I include both the KODI folder and the AppData entries for KODI?
Yes, if you are just replacing the roaming folder, then all of it needs to be put back.


(2019-04-07, 05:08)hurricane51 Wrote: should I restore to the previous version (17.6), although that backup is about 6 weeks old?
No, because v18 is not backwards compatible with v17.6.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#4
(2019-04-07, 05:25)PatK Wrote: It appears you may have a drive that has some corrupt table, or perhaps some disk re-allocation issue. The entire hard drive and it's contents are at risk. Best case would be to pull everything off and format and test until you're satisfied (if you have a spare, now is the time for the swap), you can always keep the suspect drive as the treasured back-up or RMA if you're within the window. You didn't mention if you export to separate files, and then the meta-data & images would be available for a local quick scrape. If your back-ups are Kodi 17.6, revert to that install then progress to Leia from that point. Question how full is the drive, I would pull the files off asap.
Ummm, I already detailed my replacing the drive and restoring the content from a backup.
Reply
#5
(2019-04-07, 05:28)Karellen Wrote:
(2019-04-07, 05:08)hurricane51 Wrote: should I do an Import using the KODI backup from a week ago, or use a restore from my backup program
Not willing to answer without more info of your setup. If you use minimal add-ons, I personally would start fresh, and import your library. I am assuming here you mean a Single File Export of your Video and/or Music Library.

Fresh is best. It will get rid of the crud that could be causing issues.

If you are not talking about a Single File Export, then tsk, tsk tsk. You should export your library and use it as your backup.
(2019-04-07, 05:08)hurricane51 Wrote: Should I include both the KODI folder and the AppData entries for KODI?
Yes, if you are just replacing the roaming folder, then all of it needs to be put back.
 
(2019-04-07, 05:08)hurricane51 Wrote: should I restore to the previous version (17.6), although that backup is about 6 weeks old?
No, because v18 is not backwards compatible with v17.6. 
Yes, everything is backed in every way possible. My question is, replace everything from an external backup program, or simply use the import feature in KODI?
Reply
#6
Does it matter? Try one, then try the other.

You posted in Windows, so I assume you are using Windows, being a full operating system.

These are my Roaming folders...
Image

As you can see I have a number of Kodi Roaming folders that I use, depending own what I am testing. I simply rename them when I need to use one in particular. There are no downfalls, glitches, bugs or any other issues doing this. Kodi will just use whatever is in the current \Roaming\Kodi\ folder.

There is no reason why you cannot do the same. Copy your external backup version, try it. If you don't get the results you like, then rename that Kodi folder, and use the BAckup Add-on to restore. Don't like that one? then rename or delete the Kodi roaming folder and start fresh as I mentioned above.

At the risk of repeating myself, I always believe a fresh start is the way to go when rebuilding. Of course, you need an Export first. Maybe use one of your backups to run the Export to Separate Files, then start fresh. See links in My Signature for more info.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#7
(2019-04-07, 06:32)Karellen Wrote: Does it matter? Try one, then try the other.

You posted in Windows, so I assume you are using Windows, being a full operating system.

These are my Roaming folders...
Image

As you can see I have a number of Kodi Roaming folders that I use, depending own what I am testing. I simply rename them when I need to use one in particular. There are no downfalls, glitches, bugs or any other issues doing this. Kodi will just use whatever is in the current \Roaming\Kodi\ folder.

There is no reason why you cannot do the same. Copy your external backup version, try it. If you don't get the results you like, then rename that Kodi folder, and use the BAckup Add-on to restore. Don't like that one? then rename or delete the Kodi roaming folder and start fresh as I mentioned above.

At the risk of repeating myself, I always believe a fresh start is the way to go when rebuilding. Of course, you need an Export first. Maybe use one of your backups to run the Export to Separate Files, then start fresh. See links in My Signature for more info.
I just did a restore from my backup of April 1. No problems and everything works once more. Thanks for the suggestions -- I'll file them away for future use, which I'm sure I will need at some point. And I'm glad I'm obsessive about backups.
Reply
#8
Thread marked solved.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
KODI Database Corruption?0