Migrating Users & Playlists.......

Need help? Post your questions here.

Migrating Users & Playlists.......

Unread postby hogfan » 23 Sep 2014, 14:48

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
hogfan
 
Posts: 5
Joined: 24 Apr 2013, 03:46
Has thanked: 0 time
Been thanked: 3 times

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

Unread postby gurutech » 23 Sep 2014, 15:37

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.)
gurutech
Contributor
Contributor
 
Posts: 325
Joined: 02 Jan 2013, 04:56
Has thanked: 12 times
Been thanked: 131 times

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

Unread postby DoCC » 06 Oct 2014, 00:50

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 ...
User avatar
DoCC
Contributor
Contributor
 
Posts: 210
Joined: 25 Feb 2014, 14:41
Location: UpperBavaria : ))
Has thanked: 41 times
Been thanked: 71 times

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

Unread postby graewulf » 16 Oct 2014, 16:46

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.
graewulf
 
Posts: 5
Joined: 05 Dec 2013, 21:58
Has thanked: 3 times
Been thanked: 3 times

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

Unread postby DoCC » 16 Oct 2014, 22:29

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 ^^
User avatar
DoCC
Contributor
Contributor
 
Posts: 210
Joined: 25 Feb 2014, 14:41
Location: UpperBavaria : ))
Has thanked: 41 times
Been thanked: 71 times

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

Unread postby jsgates » 16 Jan 2015, 17:15

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.
jsgates
 
Posts: 54
Joined: 22 Oct 2013, 21:53
Has thanked: 0 time
Been thanked: 16 times

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

Unread postby jsgates » 16 Jan 2015, 18:15

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
jsgates
 
Posts: 54
Joined: 22 Oct 2013, 21:53
Has thanked: 0 time
Been thanked: 16 times

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

Unread postby jsgates » 16 Jan 2015, 18:22

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.
jsgates
 
Posts: 54
Joined: 22 Oct 2013, 21:53
Has thanked: 0 time
Been thanked: 16 times

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

Unread postby richbach11 » 10 Apr 2018, 16:34

You can give a try to MusConv tool, transfer your tracks and playlists to Apple Music, Spotify, Google Music and more for free.
richbach11
 
Posts: 1
Joined: 10 Apr 2018, 16:33
Has thanked: 0 time
Been thanked: 0 time


Return to Support 5.x

Who is online

Users browsing this forum: No registered users and 2 guests

cron