Help

1

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

Avatar
Remya

I am facing this issue for last 3 days. I don't know how to solve this issue. I search and got many answers. No one worked for me.

I know, how to back up the database using the command line. 

Please help me to sort the issue. Both issue in back up and restore. 

Noted: No issue in creating a new database and drop the database. 

No Postgresql client conflict. Port No is the same for Postgresql and odoo.conf file.



头像
丢弃
1 答案
1
Avatar
Ravi Gadhia
Best Answer

it's a known issue of version miss-match of postgres and pg_dump.
locate postgres using which command and change correct path of pg_dump using 


ln -s /usr/postgres-version/bin/pg_dump /usr/bin/pg_dump --force


~ % which postgres
/usr/local/bin/postgres
~ % which pg_dump
/usr/local/bin/pg_dump
~ % postgres --version
postgres (PostgreSQL) 11.4
~ % pg_dump --version
pg_dump (PostgreSQL) 11.4

ref: https://github.com/odoo/odoo/issues/31085
https://www.odoo.com/forum/help-1/question/database-backup-error-postgres-subprocess-usr-bin-pg-dump-no-owner-file-tmp-tmpaa0o5q-dump-sql-u-ahlain-db01-error-1-118245

头像
丢弃