Restore users?

Need help? Post your questions here.

Moderator: moderators

Restore users?

Postby Nikonerik » Sat Dec 22, 2012 5:49 pm

I performed a fresh install of Subsonic.

If I backed-up correctly, is there a way I can restore my users?
Nikonerik
 
Posts: 63
Joined: Wed Oct 10, 2012 1:49 pm

Re: Restore users?

Postby bushman4 » Sat Dec 22, 2012 5:55 pm

Sure.

Open the subsonic.db folder and open subsonic.script.

Find the lines that insert the user accounts into the database. Try searching for a known username.

Copy those lines.

Go to http://YourSubsonicAddress/db.view.

Paste the lines into the box and click OK.

Then find the lines that insert User Roles, and copy and paste them into the db.view box and execute them.

Glenn
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Restore users?

Postby Nikonerik » Sat Dec 22, 2012 7:26 pm

Thank you for your reply . . .
So I DO have a backup of my users . . .

However, when I enter my subsonic address/db.view it brings me to my regular log-in screen etc.
Nikonerik
 
Posts: 63
Joined: Wed Oct 10, 2012 1:49 pm

Re: Restore users?

Postby hakko » Sat Dec 22, 2012 7:33 pm

It only works if you log in as admin (or with admin rights).
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: Restore users?

Postby Nikonerik » Sat Dec 22, 2012 8:30 pm

I've set up two administrator accounts. When I try and go to /db.view and log-in with either administrator accounts, I go to /login.view - in fact, when I type . . . ./db.view into the address bar, it changes to /login.view when I press Enter.
Nikonerik
 
Posts: 63
Joined: Wed Oct 10, 2012 1:49 pm

Re: Restore users?

Postby Pessoa » Sun Dec 23, 2012 6:07 am

when I copy and paste in I get the follow error:

Violation of unique constraint $$: duplicate value(s) for column(s) $$: SYS_PK_50

any idea what I'm doing wrong? thanks
Pessoa
 
Posts: 26
Joined: Sat Dec 22, 2012 6:50 pm

Re: Restore users?

Postby hakko » Sun Dec 23, 2012 7:42 am

Nikonerik: you need to login as admin, and once you're logged in, go to db.view in the same browser. That should work.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: Restore users?

Postby Nikonerik » Sun Dec 23, 2012 2:00 pm

Oh.

Log in FIRST!

:oops:

( . . . . added later)

NICE! Thank You!

Pessoa: I got that error too. Have a look at who you've restored already. We'll get that error when you are asking the system to add a value that's already there.
Nikonerik
 
Posts: 63
Joined: Wed Oct 10, 2012 1:49 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 48 guests