Skip to Content
Menu
This question has been flagged
5 Replies
55932 Views

Impacted versions: 10.0

Steps to reproduce: Export some db from one server then try to import in another server.

Current behavior: returns this error:

Database restore error: Postgres subprocess ('/usr/bin/pg_restore', u'--dbname=restored', '--no-owner', '/tmp/tmpm_lKWR') error 1

Expected behavior: I expect to recover my data in another db, for testing needs

Thanks in advance.

(ps: sorry for the copy/paste from the github issue.. i just need help to solve this ASAP)

Avatar
Discard

Hello, I've the same issue.

In v11 from one server to other server also v11 , if I try to restore the database .zip I get that error, if I try to restore the same database without the filestore(.dump) the restore is completed.

Did you found the solution ?

Best Answer

My solution, this I did in 2020 to move an instance of Odoo 9 to a virtual machine.

If you do the backup in Postgresql 9.0.23 for example and you want to restore in a Postgresql instance with version 9.3.x it will not allow it, you need to restore from the same version that you made the backup.

You restore by doing:

postgres@Odoo9:/home/administrador$ psql

postgres=# create database my_database;

postgres=# alter database my_database owner to odoo;

postgres@Odoo9:/home/administrador$ psql -U odoo -d my_database -h localhost -f my_database_bak.sql

  


Avatar
Discard

This is the solution.

Thank you for sharing.

Best Solution and saved 2 day

how should I do this?

Best Answer

the root cause for this error is mismatch the version of Postgresql

Please make sure the version of Created Database and Version of Postgres that is trying to backup that DB is the same.

if your VPS, hosting machine install many versions postgres, when odoo run psql backup it would take the oldest version to back up, while when you create DB with the db port at version that you want to run, and create DB.


Avatar
Discard
Best Answer

Hi Diogo!  (MORE QUIKY WAY)

Yo pude resolverlo, el problema es cuando intentas importar la database seleccionando el objeto "dump.sql" , lo correcto es elejir el objeto .zip que obtienes al Exportar la database, en ese caso me importó con exito y sin errores la informacion completa.

I has been able to solve it , my problem was when i try to import the database clicking "Restore Database" and load the "dump.sql" archive, but the correct way its loading the entire .zip file that export the odoo when you clic in "backup".


i hope it works.


Avatar
Discard
Best Answer

You could check to see if you have postgresql-client package installed in your OS. That could lead you to those errors

Avatar
Discard

postgresql-client should be installed or not installed?

it should be installed

Best Answer

First check if you can create db from UI successfully. If not there is error in your Odoo installation or config.

If you can create db from UI but could not restore, please check your addons modules or addons_path settings.

Avatar
Discard
Related Posts Replies Views Activity
4
Jul 24
1915
1
Jul 24
764
2
Feb 23
4904
0
Apr 22
1710
1
Mar 15
4620