Postgres backup scheduler uses username as database name
Fábio Bracht
Describe the bug
Scheduled backups for PostgreSQL are failing because the backup command wrongly uses the username as the database name.
To Reproduce
- Configure PostgreSQL service with:
- Username:
ProdAdminPostGres01
- Database name:
easyflow-prod
- Define scheduled backup (cron) in UI.
- Save and check logs or wait for schedule.
Observed behavior
Logs show:
psql -U ProdAdminPostGres01 -d ProdAdminPostGres01
Which fails with:
FATAL: database "ProdAdminPostGres01" does not exist
Manual backups work correctly.
Expected behavior
Scheduled backups should use the configured database name (
easyflow-prod
), not the username.CLI confirmation
Inside
/etc/easypanel/data/data.mdb
the variables are set correctly:DBUSER="ProdAdminPostGres01"
DBNAME="easyflow-prod"
So the bug is in scheduler command generation.
Environment:
* EasyPanel v2.20.1
* Postgres 17.4-alpine
* Backup provider: Google Drive
Logs:
* Error from CLI:
FATAL: database "ProdAdminPostGres01" does not exist
Additional context
Automatic scheduled backups fail; manual backups succeed.
Looks like scheduler improperly binds
DBUSER
instead of DBNAME
.Please let me know if you need more logs or diagnostics. Thanks!
M
Muhammad Ahsan Shaikh
We can connect with you if you can reproduce this in-front of us. I would like to write a report on this, if this is really an issue. Thanks! Fábio Bracht
Fábio Bracht
Muhammad Ahsan Shaikh
I have a question. Is this automatic backup feature in Postgres a feature that requires a paid license? Because I use the free version.
If not, how can we access it so that they can validate this problem? Anydesk?
M
Muhammad Ahsan Shaikh
Thanks for raising this to us.
Please correct us if we are wrong.
- We have tried setting up the postgresql instance with a user "newuser"
- We set up cron for every minute backup of the database and it worked fine.
Let me know if I missed something?
Fábio Bracht
Muhammad Ahsan Shaikh
When I create a backup configuration — even replicating the exact same setup you did — right after saving it, I receive the following error message:
2025-06-24 14:48:54.623 UTC [45] FATAL: database "newuser" does not exist
It seems the system is using the username as the database name, instead of the correct database name I provided.
However, when created with names equal to the attacked video, no error is reported in the console, but it does not work.