A few days I made a backup of tyk, I export my mongo collections and redis db, then, I try to restore a snapshot of tyk importing the mongo collections and set redis db. Everything looks ok with my APIs definitions but when I try to use the Dashboard API (users and organizations was imported too) tyk response with 401 status code and “Unauthorized” message, It seems that my " Tyk Dashboard API Access Credentials" doesn’t work correctly. ¿Any one knows why happen that? or I need to do something extra when making a restore…
That’s super weird behaviour. Your Dashboard API access key should be the same, assuming you’re using the same user before and after the restore.
You can find the API access key under your user profile, if you click “Edit Profile” in the top right, you’ll see:
That’s your API access key. It’s also stored in Mongo under the “tyk_analytics_users” collection, which means it should have been backed up and restored along with the rest of your data.
Are you using the same user?
Yes, We have two users and both are the same before and after restoring. We found that when a tyk is restored is necessary wait a while, we wait a day, hehe, and appears that everything works
Interesting. Would you mind sharing what other issues you’ve run into that get resolved after a little wait?
Sure, this time we are using a Tyk for user authentication, well, works like this when a new user creates an account in our system, we create a developer user on Tyk, then we create a key request for that developer account on Tyk to get a valid key too, this key is used for authorizes the systems access. The backup was between two domains (domainone.com to domaintwo.com) and Tyk behavior was wired in the second domain, hehe, all developer keys are ignored when try to test our system with the backup Tyk, we try to do this few times and in the last time, we decided to wait a while, first 15 minutes, then an hour, and finally a day but we believe that this wired behaviour is solved in four hours maybe.
Thank you @alex.padilla. That’s really helpful. I’ll be on the watch for that in the future.
Please let us know if you run into other issues.
I am interested about this problem: we plan to have strategic services running on Tyk, and waiting a day after a disaster recovery is not a (good) option.
Are you searching about this problem? Is there constraints or specific procedures about the restore of the Tyk databases (MongoDB, but maybe the Redis ones too) ?
We did not made any recovery tests yet, but we thought there would not be any problem, just having to restore the database(s) with the same configurations (.conf files) on all components.
Hi @chrislq ,
we’ve never run into this issue before, so it’s hard to answer.
Our paying customers are entitled to free email support or Enterprise SLA support, where we’d usually dig into the underlying issue, as opposed to just fixing the problem.
In this specific case, I’ve yet to investigate this further, though I’ve made a note to do so.
We have a pro license ;).
Glad to hear that it is not common - and quite strange since it is only a db restoration - by the way.
We will report if we encounter a problem of restoration.
Well of course you’re always encouraged to take advantage of our customer service via Support. Open up a ticket and one of our engineers will work with you.
I’ve made a note to test our the restore feature, I’ll update this thread if I’ve found anything