odoo / docker

Other
961 stars 1.55k forks source link

[12] Database backup error: Postgres subprocess #263

Closed hmrickhoff closed 4 years ago

hmrickhoff commented 5 years ago

latest Odoo12 Docker Version installed. I cannot make any Backups anymore.

Database backup error: Postgres subprocess ('/usr/bin/pg_dump', '--no-owner', '--file=/tmp/tmpagnpx8qa/dump.sql', 'dbname') error 1

In Odoo Container: psql -V psql (PostgreSQL) 11.4 (Debian 11.4-1.pgdg90+1)

In DB Container: psql -V psql (PostgreSQL) 10.9 (Debian 10.9-1.pgdg90+1)

E4eqRL0yw0yajQJ433QL commented 4 years ago

I am experiencing the same issue. Exactly the same error. The difference is the versions that we are using (which makes the issue probably more explainable in my case):

Root cause in my case is probably that the latest image of odoo:11 does not yet contain (a link to) the latest postgresql client, i.e. postgresql client 12.

Error: Database backup error: Postgres subprocess ('/usr/bin/pg_dump', '--no-owner', '--file=/tmp/tmp2a2kz42r/dump.sql', 'dbname') error 1

Check of the odoo container: odoo@odooXX:/$ psql --version psql (PostgreSQL) 11.5 (Debian 11.5-3.pgdg90+1)

Check of the database container: root@odooXX-db:/# postgres --version
postgres (PostgreSQL) 12.0 (Debian 12.0-2.pgdg100+1)

This issue was fixed earlier https://github.com/odoo/docker/issues/234), but seems to now have come back with postgres release 12. I do not have this problem with respectively 9.6.15, 10.10 and 11.5).

@d-fence: Is this something you already have on your radar ?

d-fence commented 4 years ago

@E4eqRL0yw0yajQJ433QL thanks for the radar ping, I'll update that

d-fence commented 4 years ago

Fixed here: 01f0a1e

E4eqRL0yw0yajQJ433QL commented 4 years ago

With the release of postgres version 13, this issue has resurfaced (at least in the odoo13 image)

Behaviour Trying to create a backup of Odoo 13 (image of 2 oktober 2020) leads to error "Database backup error: Postgres subprocess ('/usr/bin/pgdump', '--no-owner', '--file=/tmp/tmpmdhidd7/dump.sql'"

Expected root-cause Probably again the postgres client that is installed in the odoo container:

Odoo container: odoo@odoo13:/$ psql --version
psql (PostgreSQL) 12.4 (Debian 12.4-1.pgdg100+1)

Postgres database root@odoo13-db:/# postgres --version
postgres (PostgreSQL) 13.0 (Debian 13.0-1.pgdg100+1)

Workaround Workarounds are to either go back to postgres 12 (which I did and which works) or to manually install the postgres client (which I did not try as I don't really know how to do that on my synology NAS).

Scope of the issue The odoo14 image dóes actually work with postgres 13. I did not test odoo12 and odoo11, but I would expect that those will experience the mentioned issue.

@d-fence: your are probably already aware of this, but just in case :-) ...

E4eqRL0yw0yajQJ433QL commented 3 years ago

After I wrote the above, a new image (20201012) has appeared. Odoo version 12, 13 and 14 are all ok now. Version 11 is still on postgres client 12.4 (and hence shows the mentioned behaviour when used with postgres 13). So for odoo 11, you either want to stay on postgres version 12 or lower, or manually install the postgres 13 client if you insist on using postgres 13.