Kodi Community Forum
Rollback from SQL to local DB - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Rollback from SQL to local DB (/showthread.php?tid=340901)



Rollback from SQL to local DB - NiffStipples - 2019-02-15

Hey guys,

i hope someone can help me with my problem Sad :

Unfortunately my SQL DB crashed recently and now my Kodi Library is gone (had to deactivate the SQL connection in advancedconfig.xml - otherwise Kodi wouldn't start)
Is there any possible solution to get the Database back from the local stored "MyVideos107.db" in "userdata/Database" or is it only working in connection with its SQL DB?

It would be a real pain to rescan the whole library so if anyone has any suggestion i would be really really REALLY grateful Wink

Thanks in advance Smile


RE: Rollback from SQL to local DB - pkscout - 2019-02-16

No there isn't.  When you changed over to the MySQL connection all the data moving forward was in the MySQL database.  The local one was not touched at all during that time and only has whatever you had in it right before you changed to MySQL.


RE: Rollback from SQL to local DB - Klojum - 2019-02-16

(2019-02-15, 23:29)NiffStipples Wrote: i hope someone can help me with my problem. Unfortunately my SQL DB crashed recently
An MySQL database is unfortunately not the same as a simple single text file on your local machine.

The only way of somewhat preventing full disasters is making regular backups. Either directly via exporting your MySQL database(s) via a mysqldump (or via export functions in tools like MySQL Workbench, which do this in seconds), and/or every once in a while you do a Video Library Export, so all metadata is placed in .nfo files along with fanart and stored next to each video. Rescraping a collection with proper .nfo files goes x-times faster than an initial scraping.


RE: Rollback from SQL to local DB - NiffStipples - 2019-02-16

Thanks for your replies and suggestions Smile Fortunately i was very lucky and could restore the DB after fiddling all night - i also created a cronjob to backup the db on a regular basis now. 
I think i've learned something Wink

Bye