Make an XML iTunes Library working in a NAS server I recently bought a QNAP NAS (TS-251) and everything is working fine. I'm now on the iTunes part of my setup and here is my tricky situation.
I have a personal library I'm backuping that I would like for other users to use it. But… in iTunes Library.xml, files locations are absolute from the path of my external hard drive, something like that:

&lt;key&gt;14225&lt;/key&gt;
        &lt;dict&gt;
            &lt;key&gt;Track ID&lt;/key&gt;&lt;integer&gt;14225&lt;/integer&gt;
            &lt;key&gt;Size&lt;/key&gt;&lt;integer&gt;4435969&lt;/integer&gt;
            &lt;key&gt;Total Time&lt;/key&gt;&lt;integer&gt;184398&lt;/integer&gt;
            &lt;key&gt;Year&lt;/key&gt;&lt;integer&gt;1968&lt;/integer&gt;
            &lt;key&gt;Date Modified&lt;/key&gt;&lt;date&gt;2014-09-02T15:50:51Z&lt;/date&gt;
            &lt;key&gt;Date Added&lt;/key&gt;&lt;date&gt;2010-03-02T14:39:54Z&lt;/date&gt;
            &lt;key&gt;Bit Rate&lt;/key&gt;&lt;integer&gt;192&lt;/integer&gt;
            &lt;key&gt;Sample Rate&lt;/key&gt;&lt;integer&gt;44100&lt;/integer&gt;
            &lt;key&gt;Play Count&lt;/key&gt;&lt;integer&gt;2&lt;/integer&gt;
            &lt;key&gt;Play Date&lt;/key&gt;&lt;integer&gt;3491776434&lt;/integer&gt;
            &lt;key&gt;Play Date UTC&lt;/key&gt;&lt;date&gt;2014-08-24T23:53:54Z&lt;/date&gt;
            &lt;key&gt;Skip Count&lt;/key&gt;&lt;integer&gt;2&lt;/integer&gt;
            &lt;key&gt;Skip Date&lt;/key&gt;&lt;date&gt;2014-09-02T15:50:56Z&lt;/date&gt;
            &lt;key&gt;Rating&lt;/key&gt;&lt;integer&gt;100&lt;/integer&gt;
            &lt;key&gt;Album Rating&lt;/key&gt;&lt;integer&gt;100&lt;/integer&gt;
            &lt;key&gt;Album Rating Computed&lt;/key&gt;&lt;true/&gt;
            &lt;key&gt;Persistent ID&lt;/key&gt;&lt;string&gt;150197A413DBC3FB&lt;/string&gt;
            &lt;key&gt;Track Type&lt;/key&gt;&lt;string&gt;File&lt;/string&gt;
            &lt;key&gt;File Folder Count&lt;/key&gt;&lt;integer&gt;-1&lt;/integer&gt;
            &lt;key&gt;Library Folder Count&lt;/key&gt;&lt;integer&gt;-1&lt;/integer&gt;
            &lt;key&gt;Name&lt;/key&gt;&lt;string&gt;Light My Fire&lt;/string&gt;
            &lt;key&gt;Artist&lt;/key&gt;&lt;string&gt;Jose Feliciano&lt;/string&gt;
            &lt;key&gt;Genre&lt;/key&gt;&lt;string&gt;Latin&lt;/string&gt;
            &lt;key&gt;Kind&lt;/key&gt;&lt;string&gt;Fichier audio MPEG&lt;/string&gt;
            &lt;key&gt;Location&lt;/key&gt;&lt;string&gt;file://localhost/Volumes/EXHD/Music/-/Jose%20Feliciano%20-%20Light%20my%20Fire.mp3&lt;/string&gt;
        &lt;/dict&gt;


and this line is actually kinda problematic:

&lt;key&gt;Location&lt;/key&gt;
&lt;string&gt;file://localhost/Volumes/EXHD/Music/-/Jose%20Feliciano%20-%20Light%20my%20Fire.mp3&lt;/string&gt;


As planning for others to pick the iTunes Library.xml directly from the NAS, the file Location path needs to be from the NAS and not from my personal external hard drive.

As I'm backuping my drive every hour via ChronoSync (like TimeMachine in some way), I was thinking about replacing every Location path with the one of the NAS.
Is it possible, and if yes, how can I do it? Because I have 60000+ items in my library, willn't take ages to replace it via an Apple/bash script?
Or maybe you have other suggestions… every help welcomed!

PS: Already tried the iTunes server from QNAP but really not convenient… You have to manage all your library from a poorly developed web interface, and that will be a duplicate from my library.
Link the library from the NAS to the local machine. I wrote a hint about this on Mac OS X Hints many years ago and I still use it (but in my case, I use a dmg to store my library on).

http://hints.macworld.com/article.php?story=2003041911193115

(Should be available on Wayback Machine as well)