can users be imported from older version

Need help? Post your questions here.

Moderator: moderators

can users be imported from older version

Postby DarkBeer » Tue Jun 29, 2010 2:31 am

I upgraded my Ubuntu install and finally got around to getting Subsonic installed again. I was previously using 3.8, and just installed the 4.01 deb package. Is there a way for me to transfer the users from the older version to this new one so I don't have to recreate them manually?
DarkBeer
 
Posts: 5
Joined: Thu Jul 10, 2008 1:16 pm

Postby oeh » Tue Jun 29, 2010 10:18 am

Extract users from old db, import in new install? maybe.
Or just try copying the old db to the new install.
Regards
OEH ;-}
User avatar
oeh
 
Posts: 89
Joined: Wed Apr 21, 2010 9:26 pm
Location: Oslo Norway

Postby mgrant » Wed Jun 30, 2010 8:59 pm

In the subsonic db directory ('/var/subsonic/db' on Linux, not sure what it is on Windows) there should be a file called subsonic.script.

On the machine that has the users you want, you can collect these users like this:

From windows cmd prompt:
Code: Select all
type subsonic.script | find "INSERT INTO USER "


From linux shell prompt:
Code: Select all
grep 'INSERT INTO USER ' subsonic.script


Then in a web browser log in to the new subsonic (the one without the users you want). In the URL, replace index.view with db.view then paste the output from above into the text field and submit

I haven't tested this but I think it should work. It won't preserve any of the user's settings but it will keep their password. You can poke around in the subsonic.script to see other database values that you might be interested in.

I suppose that if you want the new install to be the same as the old (not just the same users) you might be able to just copy the subsonic.script from old to new and then restart subsonic (like oeh suggested).

-mg
mgrant
 
Posts: 76
Joined: Mon Mar 03, 2008 1:15 am


Return to Help

Who is online

Users browsing this forum: No registered users and 16 guests