Se rendre au contenu
Menu
Cette question a été signalée
5 Réponses
58798 Vues

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
Ignorer

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 ?

Meilleure réponse

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
Ignorer

This is the solution.

Thank you for sharing.

Best Solution and saved 2 day

how should I do this?

Meilleure réponse

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
Ignorer
Meilleure réponse

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
Ignorer
Meilleure réponse

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

Avatar
Ignorer

postgresql-client should be installed or not installed?

it should be installed

Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
4
juil. 24
3191
1
juil. 24
1953
2
févr. 23
6153
0
avr. 22
2393
1
mars 15
5268