Page 1 of 1

Migrating Users & Playlists.......

Posted: 23 Sep 2014, 14:48
by hogfan
I want to upgrade to 5.1, but I don't want to have to re-create all my users and playlists. I know how to manually backup the playlists. Is there an easy way to backup and re-import my users into the new installation?

-hogfan

Re: Migrating Users & Playlists.......

Posted: 23 Sep 2014, 15:37
by gurutech
If you are doing an upgrade, you won't lose any settings (depending on what version you are upgrading from). See the installation notes in the forum to see if you will need to "rename" your data files from "subsonic.???" to "madsonic.???". (You still shouldn't lose any settings, but renaming the files is mandatory if upgrading from an older version.)

Re: Migrating Users & Playlists.......

Posted: 06 Oct 2014, 00:50
by DoCC
As given in the DL section of 5.1 it is highly NOT recommended to upgrade your installation.
You have to start from scratch.

the only thing worked til now is to copy some usersettings from the old .script file to the new one.

EDIT : i'm talking 'bout the /var/madsonic/db/ .script files

What you should do is following these steps :
- backup the old .scripts file
- install the new version
- start the server
- login with admin:admin to your new panel
- stop the server
- open the old .scripts file and the new one
- search for stuff like

Code: Select all

INSERT INTO USER VALUES('default','enc:61393363616436643634363331373762333265393733383230306465306562393436626539656331',0,0,0,FALSE,NULL,0,TRUE,'#default user')
INSERT INTO USER VALUES('demo','enc:31396137656631313834343635373965343765653765656531333366386439393137636131343562',0,0,0,FALSE,NULL,0,TRUE,'#demo user')
!! The older .scripts file has fewer digits in the 'enc:xxxxxxxxxxxxx' section !! leaving this as is works fine.
In order to make the old useraccounts work you have to add ,NULL or ,'some shit' on the left side of the tailing )

- save new scripts file
- start server

EDIT : dont forget to reassign a new admin password. the warning at the loginscreen disappears only after initial pw change of admin... even if you had an other value copied from your old file....

now you can login with old credentials .......... only if you use Madsonics own loginsystem.
// the usersettings are available, the admin has to enable some features AGAIN like " is allowd to play" and so on. the specific userpassword may has to changed //

There will be NO statistical data anymore, these lines are stored at the end of the .script file but have changed in simantics. no way to get around this.
you have to refill your last.fm acc if you use one.
settings concerning theme and stuff like this is also thrown away ...

Re: Migrating Users & Playlists.......

Posted: 16 Oct 2014, 16:46
by graewulf
There is a slightly simpler way to do this:


What you should do is following these steps :
- backup the old .scripts file
- install the new version
- start the server
- login with admin:admin to your new panel
- stop the server
- open the old .scripts file
- search for stuff like

Code: Select all

INSERT INTO USER VALUES('default','enc:61393363616436643634363331373762333265393733383230306465306562393436626539656331',0,0,0,FALSE,NULL,0,TRUE,'#default user')
INSERT INTO USER VALUES('demo','enc:31396137656631313834343635373965343765653765656531333366386439393137636131343562',0,0,0,FALSE,NULL,0,TRUE,'#demo user')
In Madsonic, click the DB button
copy and paste the section from above into the box in the DB window.
Delete the default accounts from the list (Admin, Guest, Demo, Default)
Append ,'' before the )

Code: Select all

INSERT INTO USER VALUES('default','enc:61393363616436643634363331373762333265393733383230306465306562393436626539656331',0,0,0,FALSE,NULL,0,TRUE,'#default user','')
INSERT INTO USER VALUES('demo','enc:31396137656631313834343635373965343765653765656531333366386439393137636131343562',0,0,0,FALSE,NULL,0,TRUE,'#demo user','')
Click "OK"

Your users have been added.

Go into settings and set the users permissions.

Re: Migrating Users & Playlists.......

Posted: 16 Oct 2014, 22:29
by DoCC
yeah you are right,
i guess Mad is able to build a proper piece auf software. but my expierience tells me, that online and realtime manipulation of db is an risky operation.
since then i try to manage smaller things like this manually ^^

Re: Migrating Users & Playlists.......

Posted: 16 Jan 2015, 17:15
by jsgates
This is good info. What would be nice would be a user migration script of some sort, like an option in Settings to "Export Users", "Playcounts", "Comments", etc. And then when you install a new version, an option in Settings to Import that data. This is one of the big issues when upgrading Madsonic........not losing all your stuff. Playlists are fine now since the newer versions allow you to export and import & restore playlists.

Re: Migrating Users & Playlists.......

Posted: 16 Jan 2015, 18:15
by jsgates
I can't import my users. When trying to do so I get this error:


integrity constraint violation: foreign key no parent; FK_GROUP_ID table: USER

Re: Migrating Users & Playlists.......

Posted: 16 Jan 2015, 18:22
by jsgates
Figure it out by querying the Users table. I had custom access groups before an the IDs were invalid. Setting the groupid field to zero fixed the issue and I was able to import.

Re: Migrating Users & Playlists.......

Posted: 10 Apr 2018, 16:34
by richbach11
You can give a try to MusConv tool, transfer your tracks and playlists to Apple Music, Spotify, Google Music and more for free.

Re: Migrating Users & Playlists.......

Posted: 05 May 2019, 11:57
by Annie_Yazbeck
Could I confirm which music source your music files are from? If they are Spotify music and playlists, to backup Spotify playlists, it could be much easier than other streaming music source. Because there is a professional Spotify Music Downloader that can not only download Spotify files offline but also convert them to common audio tracks so that you can easily transfer them to other devices and backup them in USB drive, etc. as you like.
It's very easy to operate. You can have a try to migrate playlists and your accounts. If your audio files are from other sources, please let me know and I will try my best to give further assistance.