Page 1 of 1

can users be imported from older version

PostPosted: Tue Jun 29, 2010 2:31 am
by DarkBeer
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?

PostPosted: Tue Jun 29, 2010 10:18 am
by oeh
Extract users from old db, import in new install? maybe.
Or just try copying the old db to the new install.

PostPosted: Wed Jun 30, 2010 8:59 pm
by mgrant
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