Migrate subsonic installation

Need help? Post your questions here.

Moderator: moderators

Migrate subsonic installation

Postby kayvee » Mon Jan 01, 2018 9:44 pm

My subsonic server set up is several years old and I have a large number of tracks with ratings and playlists of my liking. I am now in the process of moving it to a different machine and was wondering which folders should I drop into the new set up to get it back to where it was originally. I am keeping the usernames, passwords, music folders, etc the same. I just need the tracks associated to their correct ratings and playlists. My server is an Ubuntu machine so after I installed subsonic on my new machine, I overwrote the entire /var/subsonic folder with the one from my old machine. I also replaced the new /etc/default/subsonic file with the one from the old machine. A restart later I was hoping to be back in business but that did not work out :-( Any ideas how to fix this?
kayvee
 
Posts: 51
Joined: Fri Apr 10, 2009 7:26 pm

Re: Migrate subsonic installation

Postby Jägs » Tue Jan 02, 2018 3:07 am

Can't help with the ratings/users side of thing--I assume you'd have to copy the database files to get this to work--but my main concern was preserving playlists, so I can easily uninstall/reinstall Subsonic when it gets upset, and just reimport them. I created a Perl script to do this, which you can find here:

http://forum.subsonic.org/forum/viewtopic.php?f=5&t=17436

It simply exports all of your playlists using full paths, and assuming your file paths are the same on the new server, you should just be able to import these directly into your new Subsonic install. If your paths are different, a simple regex replace should make quick work of things.

I use the script primarily to make nightly backups.
Jägs
 
Posts: 109
Joined: Wed Apr 06, 2011 9:52 pm

Re: Migrate subsonic installation

Postby kayvee » Tue Jan 02, 2018 4:11 pm

Thanks @Jags but it is the ratings that are most important for me because all of my playlists are generated based on the song ratings. Does anyone know where the ratings are saved?
kayvee
 
Posts: 51
Joined: Fri Apr 10, 2009 7:26 pm

Re: Migrate subsonic installation

Postby Jägs » Tue Jan 02, 2018 10:06 pm

Others more familiar with the DB structure of Subsonic can correct me if I'm wrong, but I believe user ratings are kept in the USER_RATING table. You can see this by going to your Subsonic install and replacing "index.view" in the URL with "db.view" and then typing in:

Code: Select all
select * from USER_RATING


I don't use them, but tested it out for a song and here's what it returned:

USERNAME || PATH || RATING
me || /Songs/Popular/Eels/Useless Trinkets; B-Sides, Soundtracks, Rarities and Unreleased 1996-2007/Disc 1 || 4.0

(where || are simply the column separators)

Here are the rest of the tables, to the best of my knowledge:

Code: Select all
ALBUM
ARTIST
BOOKMARK
CUSTOM_AVATAR
GENRE
INTERNET_RADIO
MEDIA_FILE
MUSIC_FILE_INFO
MUSIC_FOLDER
MUSIC_FOLDER_USER
PLAYER
PLAYER_TRANSCODING
PLAYER_TRANSCODING2
PLAYLIST
PLAYLIST_FILE
PLAYLIST_USER
PLAY_QUEUE
PLAY_QUEUE_FILE
PODCAST_CHANNEL
PODCAST_EPISODE
ROLE
SHARE
SHARE_FILE
STARRED_ALBUM
STARRED_ARTIST
STARRED_MEDIA_FILE
SYSTEM_AVATAR
TABLE_ID
TRANSCODING
TRANSCODING2
USER
USER_RATING
USER_ROLE
USER_SETTINGS
VERSION
VIDEO_CONVERSION
Jägs
 
Posts: 109
Joined: Wed Apr 06, 2011 9:52 pm

Re: Migrate subsonic installation

Postby kayvee » Wed Jan 03, 2018 12:30 pm

Presumably the ratings information then should be stored in the /var/subsonic/db/subsonic.data file? I already copied this file into my new installation but that did not help. I don't have access to the old server, just the files from that machine. Is there a way to open the subsonic.data file on linux? If it comes to it, I don't mind getting a list of all the starred tracks and then use the REST API to rate them again on the new server.
kayvee
 
Posts: 51
Joined: Fri Apr 10, 2009 7:26 pm

Re: Migrate subsonic installation

Postby lbvagrant » Sat Feb 10, 2018 7:20 am

i copied my install once a while back ...dont know if it still works or not...

all i did was install the server as a new prog on the new machine then copy the entire subsonic program folder from the old data over the new install and started it like normal and had all my old users and settings.
dont know if that help or still works but its a shot...
good luck :D
Sent: Thu Apr 25, 2013 12:51 am
From: itzikv
To: lbvagrant

oh boy you are one pathetic egoistic idiot.

wow someone cant deal with a NO
User avatar
lbvagrant
 
Posts: 35
Joined: Fri Jun 08, 2012 9:30 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 14 guests