Export sql database to local?
#1
Hi all,

I have been searching and cannot find an answer to my problem. Sad

I use a NAS with a few kodi devices attached and a sql database for the library etc. Now i need to export one of my kids library including watched state back to local, as they’re no longer connected to the NAS or network. Huh

Plenty of info going local to shared database, but nothing going the other way.

Any ideas would be appreciated. Cheers. Smile
Reply
#2
No guarantees... https://stackoverflow.com/questions/3890...-to-sqlite => https://github.com/dumblob/mysql2sqlite

Otherwise, do a video library export and have the video watch status / resume point tags active.

Then (re)create the kids' library, and import those videos.

Or, fix the network connection?
Reply
#3
Export the database as a single file, then close Kodi on the device that is going local and remove the MySQL stuff from advancedsettings.xml.

Copy that single database file onto the device in question, or at least somewhere that it can be accessed from it.

Restart the device and you should be back to a local database. Depending on what was already there, it may be worth cleaning everything out of it, or removing it too so a completely fresh local database set-up gets made.

Now just import that single file and you've got a local database that's a clone of the MySQL one. Fundamentally it's exactly the same sequence you use to initially populate the MySQL database, just done going the other way.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#4
Okay thanks, I shall give it a go tomorrow, fingers crossed!
Reply
#5
The problem is going to be if the database will refer to a different file structure, then of course it's going to be wrong.

To be clear, is the device that will have the new local database going to still be accessing the NAS as its source via the same network paths etc, or are you migrating everything so the source will also be different (a plug-in USB drive or suchlike)?

If the latter then the paths will change, and the database will need to be corrected if re-used, which may be a major undertaking depending on size.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply

Logout Mark Read Team Forum Stats Members Help
Export sql database to local?0