Login not working, after database restore


The internal database grafana.dtb was removed on my server.

I copied the database from the backup to var/lib/grafana. I restarted grafana and the login does not work.

I get the message: Error while signing in user

logger=context userId=0 orgId=0 uname= t=2023-06-20T13:15:58.787823903+02:00 level=error msg=“Error while signing in user” error=“failed to create auth token: attempt to write a readonly database” remote_addr=[::1] traceID=
logger=context userId=0 orgId=0 uname= t=2023-06-20T13:15:58.788832135+02:00 level=error msg=“Request Completed” method=POST path=/login status=500 remote_addr=[::1] time_ms=20 duration=20.96976ms size=54 referer=http://grafana.staged-by-discourse.com/login handler=/login
logger=billing t=2023-06-20T13:15:58.788411689+02:00 level=error msg=“Fail to update user billing role” err=“could not insert new row for 1 (server_admin): UNIQUE constraint failed: user_stats.user_id” userId=1

I ran the command in the graphana.init folder

./grafana-cli admin reset-admin-password admin

And that didn’t help either

Can someone please help me?