Jump to content

old api key on a new server


Alexwerilles

Recommended Posts

Alexwerilles

I changed the hosting emby server, backed up the settings and restored it to the new server. Turns out the api key wasn't restored on the new server either. Is there a possibility that I can use the old api key on the new server? How can I do it? I need the old key to be able to administer users

Link to comment
Share on other sites

Alexwerilles
On 8/29/2021 at 11:29 AM, Luke said:

Hi, yes this is something we can look at adding to the backup and restore plugin. Thanks.

How can I add the old API key manually on the new server?

or use the old server's database on the new server

Link to comment
Share on other sites

53 minutes ago, Alexwerilles said:

How can I add the old API key manually on the new server?

or use the old server's database on the new server

Hi, have you explored the API keys menu in the server?

Link to comment
Share on other sites

Alexwerilles
1 minute ago, Luke said:

Oi, você explorou o menu de chaves de API no servidor?

not. Where do I find this menu?

Link to comment
Share on other sites

Alexwerilles

If it is the option "Api keys" which is on the left menu, there is only the option to create a new key

Link to comment
Share on other sites

7 minutes ago, Alexwerilles said:

there is not even the option to add manually?

I agree it's something we need to add, and we can look at it, but there is currently no function to do that.

Link to comment
Share on other sites

Happy2Play
1 hour ago, Luke said:

Right OK, sorry. There currently is no way to add the old one.

Can the key be manually added into the authentication.db?

1 hour ago, Alexwerilles said:

there is not even the option to add manually?

Do you still have the old authentication.db?

Link to comment
Share on other sites

Alexwerilles
2 hours ago, Happy2Play said:

Can the key be manually added into the authentication.db?

Do you still have the old authentication.db?

I think I have

Link to comment
Share on other sites

Happy2Play
21 minutes ago, Alexwerilles said:

I think I have

 

14 minutes ago, Alexwerilles said:

yes I have access

You should be able to restore that database.  I have tested backing up my current authentication.db, shutting down Emby deleting the authentication.db and starting Emby to see no current api keys, then shutdown Emby and restored the authentication.db and started Emby to have the keys restored.

Or you could manually copy the keys from one database to the other.

Edited by Happy2Play
Link to comment
Share on other sites

Alexwerilles
3 minutes ago, Happy2Play said:

 

You should be able to restore that database.  I have tested backing up my current authentication.db, shutting down Emby deleting the authentication.db and starting Emby to see on current api keys, then shutdown Emby and restored the authentication.db and started Emby to have the keys restored.

Or you could manually copy the keys from one database to the other.

Okay, recap:

I shut down the emby server, delete the "authentication.db" from the current server.
copy the "authentication.db" from the old server, put it on the new server and start the emby server?

Link to comment
Share on other sites

Alexwerilles

can i do this also with the user.db file? So that I can use the same users from the old server? As if nothing has changed, etc?

Link to comment
Share on other sites

Happy2Play
Just now, Alexwerilles said:

Okay, recap:

I shut down the emby server, delete the "authentication.db" from the current server.
copy the "authentication.db" from the old server, put it on the new server and start the emby server?

Yes, but I would back up current one before replacing.

Just now, Alexwerilles said:

can i do this also with the user.db file? So that I can use the same users from the old server? As if nothing has changed, etc?

Yes you can, but I thought you used the Server Configuration Backup Plugin which already does this for users and userdata assuming you restored that info.

Link to comment
Share on other sites

Alexwerilles
Just now, Happy2Play said:

Yes, but I would back up current one before replacing.

Yes you can, but I thought you used the Server Configuration Backup Plugin which already does this for users and userdata assuming you restored that info.

Yes, I have already backed up the files.

It's because I restored the backup a few days ago, since then users have already made some changes to their accounts, so I wouldn't have to restore the backup again, I would just replace the user.db file...

I will do a test.

In addition to this file, there are also files:

 

"authentication.db-shm" and "authentication.db-wal"
"users.db-shm" and "users.db-wal"

 

also replaces or does not need?

Link to comment
Share on other sites

Happy2Play
1 minute ago, Alexwerilles said:

In addition to this file, there are also files:

 

"authentication.db-shm" and "authentication.db-wal"
"users.db-shm" and "users.db-wal"

 

also replaces or does not need?

Those files only exist on OPEN databases, so no you would never restore those files.

Link to comment
Share on other sites

Alexwerilles
8 minutes ago, Happy2Play said:

Yes, but I would back up current one before replacing.

Yes you can, but I thought you used the Server Configuration Backup Plugin which already does this for users and userdata assuming you restored that info.

Perfect worked. However, the old API only works when I also replace the "users.db" file with the "users.db" file also from the old server.

However, all users are activated and with administrator status, when I put the "user.db" from the old server.

Link to comment
Share on other sites

Happy2Play
11 minutes ago, Alexwerilles said:

Perfect worked. However, the old API only works when I also replace the "users.db" file with the "users.db" file also from the old server.

However, all users are activated and with administrator status, when I put the "user.db" from the old server.

Some databases and tables in old databases are obsolete.

But am guessing the old users.db does not match the "*\programdata\config\users" and new folders  with new config and policy xmls are/were created.

Just like moving a users.db can mis-align userid userdata in the library.db if they are not moved together.  But the library.db has a dependancy on /metadata/library also.

This is why moving databases alone will be problematic in most cases.  It is somewhat a package deal when it comes to the programdata folder.

Ideally you would use the plugin for users and userdata to maintain this alignment

Link to comment
Share on other sites

Alexwerilles
19 minutes ago, Happy2Play said:

Some databases and tables in old databases are obsolete.

But am guessing the old users.db does not match the "*\programdata\config\users" and new folders  with new config and policy xmls are/were created.

Just like moving a users.db can mis-align userid userdata in the library.db if they are not moved together.  But the library.db has a dependancy on /metadata/library also.

This is why moving databases alone will be problematic in most cases.  It is somewhat a package deal when it comes to the programdata folder.

Ideally you would use the plugin for users and userdata to maintain this alignment

Understand.

No problem. I will edit the status of users one by one. Thanks a lot for the help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...