If this is a filesystem mount mounted to a local folder then just change the ip and mount it to the same location and so long as the structure of the directories/files hadn’t changed then Kodi will not know this lives on a new server and no re-scraping will be needed.
Typically in the same place you set up the NFS mount in the first place. There are different ways to do this (AutoFS, fstab, within Kodi) so without knowing how you initially set up your mount it’s a bit hard to say.
This is how I’m set up using fstab and I’m pretty sure what gets store in the library is the ‘effective’ path & filename rather than the IP address. My movies are therefore stored as /mnt/sharedmedia/mymovies/… and I can relocate the server IP address simply by amending fstab if necessary.
I do however use path subsitution on a windows PC that shares the library to convert the Linux path to an IP address Windoze can understand. Seems to all work well for me. Just never try to update the library from the Windows side…
If you have it setup correctly, you can update a MySQL shared database from any connected device without issue. The important bit is that all clients are using the exact same file paths for the sources as that is what gets added to the database. When you use a path substitution that does NOT get stored in the database. So if on Windows your source path is set to /mnt/something and you do a path substitution to point to smb:/computer/something then any library updates in Windows will store /mnt/something/… paths in the database.
Sorry for hijacking this thread, but I’m planning to do something very similar, conmecting my usb HDDs to another NFS server - moving from a popcorn Hour NFS share to a newly built Raspberry Pi NFS server.
So, the IP address and the first part of the path will change - depending on how popcorn named the NFS link to the HDD and how Raspberry openmediavault vill name them, however no other changes in the file structure.
To make everything a bit more difficult, my raspberry pi also works as an SQL server for my kodi media database.
So I would need to replace the links to all my 12 usb HDDs in the database with an SQL commands as the easiest way? Or exporting the database to XML and simply replace in text editor the links and import back to the database via myphpadmin?
Current NFS link to the HDD
New NFS link to the same HDD via new server
If thats the solution, how or where can I change the media source links on Vero not to force a library rebuild?
Or do you have any better sllution for this project?
If you would like to use a MySQL database for several Kodi clients that use different methods to access the shared media (e.g. a mix of SMB, NFS and/or system mount based access), or have need of modifying a path of an existing source (such as converting from a Kodi path to a system mount) you can use the path substitution function of Kodi to facilitate this. The following guide will provide instruction on how this works, including a section specific to MySQL usage and how your sources should be configured.
Thanks, for that. Well, yes, that’s why I made this setup to be able to reach the central database and HDDs from my two Vero 4K+, and my PC kodi or any other Kodi clients. However, I will only use the NFS share on that central server (USB HDDs plugged into the Raspberry Pi OpenMediaVault NAS.
As using the Path substitution will not change the database it can cause issues with cleaning databases, and adding new movies from the new location, therefore I’d like to get rid of the old links since they won’t be used anymore. I’d like to keep them tidy with valid information for the future.
Can you please confirm, if I modify the SQL database, and replace all the links in the MyMusic72.sql and MyVideos116.sql, and in the sources.xml on the Vero 4K+ to the new links, then I won’t run into any unrepairable issues? How about the thumbnails, and album arts stored on Vero? I guess they are not related to physical network addresses.
Yes, I’m using the mariaDB server on that raspberry pi. But can export the databases to SQL files, and then do the modifications with simply REPLACE TEXT in Notepad ++, save, and import back the SQL file into the mariaDB server. Well, actually the server running at the moment on my QNAP NAS, but just moved the database to the Raspberry pi with the same way (export - import), and works like a charm.
Since the SQL export file is a text file, it must be super easy to replace all links with the text editor, rather than trying to figure out which tables contains links to HDDs.
If you want to edit your MySQL database like that then just back it up and give it a go. If you bork everything then restore from the backup. I don’t think anybody is going to recommend you go down that path and it really is not needed.
Once you have scraped in a library you just need to treat those sources as being fixed. Any clients should use the exact same sources.xml EVEN IF THE PATHS IN THEM ARE NO LONGER VALID. You can then use path substitution to fix any file path that changed or is different as described in that how-to. You can also change it on any client at any given time. If on one machine you decided to switch over to a system mount you can just change the ‘to’ part of the substitution to point to a mount instead of the network share.
If you do this as I described there is zero issues adding new movies, cleaning the database, or anything else. The database will store a file path based on what is in sources.xml and path substitution does not change this. As long as the file paths in sources.xml do not change, then how the information gets stored in the database will not change.
As for the thumbs I don’t think they would be effected either way. Your current cached thumbs are local to the client as is the database that manages them. If you have local art sources they will have links to them in the MySQL db that will have to be corrected but they would be dealt with by the same method you used for your media paths.