Moving Subsonic music to new server

Need help? Post your questions here.

Moderator: moderators

Moving Subsonic music to new server

Postby bigfrank » Tue Jun 07, 2016 9:44 am

Hello there,

I am looking to migrate my existing Subsonic library to a new server that I have built. I have cloned the HDD that contains all the music files and installed this in to the new server and then amended Subsonic to point at this new location. I thought everything would just go smoothly and Subsonic would have no issues, however, when accessing my playlists etc, all the tracks are listed as missing... All my top rated Albums and Most played albums are blank etc... So as a temporary measure I have now pointed Subsonic back to the original HDD and everything is working fine.

Is there any way round this at all? All I need to do is amend the server name somehow so its pointing to the new server and not the old server whilst maintaining full access to my playlist etc...

Any advice is greatly appreciated so I can turn off my old server once and for all!

TIA
bigfrank
 
Posts: 4
Joined: Tue Jun 07, 2016 9:29 am

Re: Moving Subsonic music to new server

Postby bigfrank » Mon Nov 14, 2016 10:31 am

So I've waited 5 months for a response but nothing back at all.

Surely someone has had to move their library to a new machine and point Subsonic to that new server?

My set up consists of 2 servers - Server 1 has the Subsonic installation and Server 2 is my file server which contains all my Music files. I want to replace Server 2 with a new File Server. Lets call it Server 3. Once I move the hard drive from Server 2 to Server 3 and point Subsonic to the new file server, everything is lost and labelled as Missing. I would really like to shut down Server 2 for good but until I can find help on restoring full library functionality when pointing to Server 3, it will remain on forever.

Please help!
bigfrank
 
Posts: 4
Joined: Tue Jun 07, 2016 9:29 am

Re: Moving Subsonic music to new server

Postby toolman » Mon Nov 14, 2016 2:54 pm

I'm sorry noone has responded to your question. However could you provide some more information?
Which OS are you using?
Did you think of making sure that Subsonic has acces-rights to server 3?
Are the UNC-names still the same for your mediafolders?
Did you try to do a folderscan when you migrated your harddisk to server 3?
Any errors in the logfile?
toolman
 
Posts: 538
Joined: Fri Dec 11, 2009 4:18 pm
Location: Netherlands

Re: Moving Subsonic music to new server

Postby bigfrank » Thu Nov 17, 2016 10:24 am

toolman wrote:I'm sorry noone has responded to your question. However could you provide some more information?
Which OS are you using?
Did you think of making sure that Subsonic has acces-rights to server 3?
Are the UNC-names still the same for your mediafolders?
Did you try to do a folderscan when you migrated your harddisk to server 3?
Any errors in the logfile?


Hey thanks for the reply! Its appreciated.

Legacy Server - Windows Storage Server 2012 (Server 2)
New Server - Windows Server Essentials 2012 R2 (Server 3)

Both machines run inside ESXi 6.0.

So I just tested this once again with a 'dummy' drive that I created on Server 2. Added music to the folder, shared the folder, created playlists from this dummy folder and confirmed all working ok. I then exported the test playlist and moved this dummy drive to Server 3. Changed the path in Subsonic, cleaned DB, re-scanned media and boom, the media works fine. My issue is that when importing the playlists back into subsonic it says that there is no media to add.

How can I update these playlists to point to new server? Recently added, Top Rated, Most played etc etc end up being empty until I move the drive back to Server 2. There must be a database file that needs amending? I guess I am 50% there now. Any advice you can offer is greatly appreciated.
bigfrank
 
Posts: 4
Joined: Tue Jun 07, 2016 9:29 am

Re: Moving Subsonic music to new server

Postby toolman » Thu Nov 17, 2016 1:17 pm

As far as I know al the playlists are inside the database. Perhaps you could export your playlists, move your harddisk, and import them again.
If you start a folderscan Subsonic will import the playlists it finds in the default folder c:\playlists. ( Of course you can change this in Settings -> General. )
Since playlists can easily be edited using Notepad you can also find out if the UNC-names are still correct after exporting them.
In the past I edited a lot of playlist to fit my new setup by using the search and replace function in notepad.
toolman
 
Posts: 538
Joined: Fri Dec 11, 2009 4:18 pm
Location: Netherlands

Re: Moving Subsonic music to new server

Postby bigfrank » Mon Jan 23, 2017 3:41 pm

Hi Toolman - So I've got my playlists all working now etc after moving the drive to the new server.

However - My Recently played, Top Rated etc is now empty - Also the Played counter is at 0 for all my albums. Is there any way to get this back? If I send the drive back to the old server, which is still running for now, the counters return to their values and all Top Rated etc re-appear.

Any help is appreciated!

Cheers!
bigfrank
 
Posts: 4
Joined: Tue Jun 07, 2016 9:29 am

Re: Moving Subsonic music to new server

Postby acroyear » Mon Jan 23, 2017 4:52 pm

It would take some pretty involved SQL to restore that information, especially given that on the new server totally new sequence IDs would have been allocated for each track, folder, album, artist. None of the information you are asking to preserve is kept in the files. It is all in the database, and there's no export feature for that sort of thing.
--
Joe Shelby
http://subfiresuite.com/
http://subfireplayer.net/
User avatar
acroyear
 
Posts: 779
Joined: Wed Mar 27, 2013 8:05 pm
Location: Northern, VA

Re: Moving Subsonic music to new server

Postby mason » Mon Jan 23, 2017 7:28 pm

I tried the same the last day, this is what I did. Shutdown original Subsonic, copy the following folders to the new server in the same location.
I guess on windows you are somewhere around C:\User\Userprofile\Adddata\Roaming\local\Subsonic something (never used Windows with Subsonic)

\db
\thumbs
\Podcatsts
\Playlisteswhatever
\lucene2
\lastfmcache

and the subsonic.properties

start subsonic on the new server

goto http://host:port\db.view and execute the following sql:

Code: Select all
SELECT
  'UPDATE ' + TABLE_NAME + ' SET ' + COLUMN_NAME + ' = REPLACE(' + COLUMN_NAME + 
  ', ''' +
  '/path/on/your/old/server' + ''', ''' +
  '/new/path/' + ''')' SQL
FROM
  INFORMATION_SCHEMA.SYSTEM_COLUMNS
WHERE
  TABLE_NAME NOT LIKE 'SYSTEM_%'
  AND (COLUMN_NAME LIKE '%PATH%' OR COLUMN_NAME LIKE '%FOLDER%')


It will give you some sql statements in return like:

Code: Select all
UPDATE ALBUM SET COVER_ART_PATH = REPLACE(COVER_ART_PATH, '/path/on/your/old/server', '/new/path/')
UPDATE MEDIA_FILE SET PATH = REPLACE(PATH, '/path/on/your/old/server', '/new/path/'))
[...]


execute these it will update your data accordingly. On windows you might have to deal with driveletter:\path\..\ so replace with your findings.

To determine your values just do a to see how the format is.

Code: Select all
SELECT PATH FROM MEDIA_FILE


Restart Service

This might not be the most elegant solution, but for me it did everything. Initialy random albums didn't showed up, but after a rescan everything was fine, all ratings and playcounts, useraccounts intact.
User avatar
mason
 
Posts: 29
Joined: Tue Apr 07, 2009 12:13 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 41 guests