Impossible to log to new instance after making a copy on Heroku


I'am running Metabase on Heroku. My current version is 0.35.4.

Before updating to a new version I wanted to test to backup my app.
So I created a new Heroku App, and followed these steps to dump and then restore the metabase postgres database in the new heroku app (
Everything run smooth until I tried to log in the new metabase app. With the same credentials that work on the original app, impossible to log in to the new one.
I connected to the postgres database of the new app and checked that information in the "core user" table were correct.

I then tried then to change my password by using this link https://my-new-metabase-app/auth/reset_password/{{token}} but it says that "Whoops, that's an expired link" with a reponse code "Unauthenticated".

I then updated the "reset_triggered" column of my user in the "core user" table and nothing changed.

Honestly I do not know what to try else and I would really appreciate if some body could give my a hint ! Thank you so much ! :heart:

Hi @Filip
Sounds like you "new-app" is connecting to a different application database than the one you're looking in.
Check the logs for more details during startup, which tells the type of application database being used.
But you should upgrade immediately, several known security issues has been fixed since 0.35.4.

Hello flamber and thank you for your fast answer ! :fire:

Unfortunately I already did the check.
I just looked at it again but when I clone the heroku repo of the "new-app" and check with the command $ heroku config I obtain exactly the same URI as the one I see in the settings tab of my postgres database on heroku thought their web interface.

Moreover, if I connect directly via terminal from the repo of my "new-app" to the metabase postgres database I can see my credentials, reset tokens and every piece of information I have in my original app.

Thank you in advance

@Filip I know nothing about Heroku, but cannot recommend it as a platform for Metabase.

Make a dump of your application database and try to spin something up locally (same version). Then do the upgrade locally and validate it's okay, then you can just upgrade your Heroku without a copy.

1 Like

Hello @flamber.

Just to keep you updated.
I followed your advice and did the backup locally on docker and still got my error :neutral_face:

I investigated, and found that the issue was on the heroku side. In fact the database that I downloaded was not the most recent one but an old copy :zipper_mouth_face:

By getting the right database I was able to backup the app locally !!!
Sorry for the trouble and thanks for your help ! :muscle:

Nevertheless when I tried to restore this exact (and recent) database to heroku i got this new error " “login_history” does not exist" although I didn't get this error locally. After a check the login_history table is in fact not im my backup export.

I was able to find a workaround by first login to my local app. This action creates the login_history table. Then I export this database with the newly created login_history table to heroku and it works.

Any thoughts why the login_history table can be empty ?

@Filip You've mixed the application database and the version of Metabase. I cannot tell what you have done, but something has gone out-of-sync.
Login history was added in version 0.40, so that's why it would be empty.
I can guarantee that the table exists, since no tables are created during actions, but are already created, when you start Metabase, which is part of the automatic migrations.