-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Database Auto-Backup fails on pg_dump error #2764
Comments
I think this is PostgreSQL >= 16 related, since I encounter this issue on all the servers where PostgreSQL 15 -> 16 db upgrade was performed. It seems that my case confirms [this issue](TRESCLOUD/odoo@977fe3b effects also raw OS and is related to the pg_dump versions > 16.1. |
same happens without this module, resolve it by installing postgres specific client version in odoo container: |
@claudiobgit did my answer resolve the issue? can you mark it resovled and close or do you still face the same problem? |
I didn't want to mess with the db client on the Odoo server and properly install postgresql-client-13 in the odoo container (Debian buster) as it could be critical for other services. So I ended up with a cron job that executes the pg_dump command from the Odoo container and that works perfectly. We can close this issue but not really solved. |
FYI.... for odoo 14 suggested postgresql version is 12... and that one works without prolem.. |
This sounds new because we were getting Odoo official images from the hub and the Docker compose yaml was taking in Postgres 13 not 12. |
Module
Database Auto-Backup
Loaded on a containerized Odoo 14.0-20231106 (CE) official image running with Docker Compose, along with PostgreSQL version 13.13 (Debian 13.13-1.pgdg120+1),
pg_dump (PostgreSQL) is version 16.0 (Debian 16.0-1.pgdg100+1)
Describe the bug
The error shows up if you go to the database management from the login page and start a full db+data backup in ZIP format.
Related to this, the Database Automatic-Backup module fails, even if you try to start the backup manually as a dev user from the db.backup model web page.
What is strange is that the automatic backup worked until around the end of September 2023, after which the files saved are empty.
To Reproduce
Affected versions: Odoo 14.0-2023xxxx (CE)
Steps to reproduce the behavior:
Expected behavior
A backup of the database should be saved in the configured directory without error.
Additional context
Logs from inside the docker db container show:
A case for pg_dump mismatch of version between the web container running Odoo and the db container running Postgres has been investigated but we have a higher pg_dump version on the web container (v16) than the db container (v13).
What is strange is that by entering the container with:
$ docker exec -it odoo-docker-deployment-web-1 /bin/bash
and executing manually (the shell user is 'odoo') a dump of the db with:
$ pg_dump -h odoo-docker-deployment-db-1 --no-owner --file=/var/lib/odoo/backups/my.db/2023_11_26_00_30_00.dump.zip my.db
then the dump is saved with no errors!
The text was updated successfully, but these errors were encountered: