Migrate to NFS from SMB while using MySQL


Running OSMC on Vero4K.
Skipping and initial loading of high bitrate content can be a little sluggish in some cases.
I have a MySQL server to synchronize different clients (although I am currently using one, in the past there were 2), and the shares are mapped via SMB.

Is there a way to port the content via NFS without losing the watched status and resetting the database?


Yes. Look up path substitution

Thanks, I’ll look it up.

If you want to use a shared mysql database for several Kodi clients that use different methods to access the shared media (e.g. a mix of SMB, NFS and/or fstab based access) you could use the path substitution function of Kodi to align the access. But watch out it is important that you only add new files to the database from a single client otherwise you would need to have different path substitutions on each client.
Please see https://kodi.wiki/view/Path_substitution for details.

You might consider exporting the library, using a text editor to do some kind of group search and replace, and then reimport it (there are some tricks to get watch status imported that are mentioned on that page). That would keep you from having to check path substitutions each and every time a path is called.


Another option that avoids the library export and reimport would be to do an SQL dump of the entire database, then do the search and replace with a text editor, and then reimport all the data. I’m not sure I’d recommend that unless you are an SQL master though.

If you go either of these routes you also need to update your sources to match (that can be done in the GUI or by editing sources.xml in your Kodi userdata folder.