New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v1.0.0b] - Postgresql backup restore fails when not user postgres superuser #1500
Comments
Easy enough to work around ALTER USER mealie WITH SUPERUSER;
# Run restore from Mealie
ALTER USER mealie WITH NOSUPERUSER; |
Newbie question, how do I connect to the postgres database to alter the user? |
I am using Mealie from the Truecharts repo in TrueNAS. I was able to grant superuser access to the mealie user in postgres by obtaining the postgres user password from the postgres container shell with the |
Thanks for the explanation! |
Run If you need more help, you might want to check out the TrueCharts Discord, and ask in the #unsupported channel. I finally figured out the missing pieces (the |
I moved from SQLite to Postgres. I ran the commands above
You don't have to do this on the New Version. The mealie user is a SUPERUSER now. However you DO need to make another superuser before you run the NOSUPERUSER one as there is only one User mealie as default. If you don't you will lock the restore out since you cannot re-promote mealie if you take SUPERUSER from it. |
First Check
What is the issue you are experiencing?
Postgresql version: 14.4
Mealie version: 1.0.0beta-3
When restoring a backup using the builtin backup restore functionality, the backup fails if Mealie is configured to use a user other than the postgres superuser.
The cause seems to be in the
drop_all()
function ofalchemy_exporter.py
. Postgres doesn't allowSET session_replication_role = 'replica'
if you are not a superuser.Log from postgres server:
Mealie is deployed with these environment variables:
If I set mealie to use the postgres superuser account, the restore works as expected.
Deployment
Docker (Linux)
Deployment Details
No response
The text was updated successfully, but these errors were encountered: