Database restore error odoo 12 community



I am trying to restore a database from the GUI, but it fails, and I get this error

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

 I am restoring from zip file , moved from another server

The user is already a superadmin in postgresql

any help please?

1 Commento

some-time complete addons is not in other system therefore you face-error ...

you are restoreing your database on same system or in other system ?

2 Risposte
Mohamed Elbagoury
Migliore risposta

Please make sure you made all the configuration like the following: 

By default, PostgreSQL only allows connection over UNIX sockets and loopback connections (from “localhost”, the same machine the PostgreSQL server is installed on).

UNIX socket is fine if you want Odoo and PostgreSQL to execute on the same machine, and is the default when no host is provided, but if you want Odoo and PostgreSQL to execute on different machines 1 it will need to listen to network interfaces 2, either:

  • Only accept loopback connections and use an SSH tunnel between the machine on which Odoo runs and the one on which PostgreSQL runs, then configure Odoo to connect to its end of the tunnel
  • Accept connections to the machine on which Odoo is installed, possibly over ssl (see PostgreSQL connection settings for details), then configure Odoo to connect over the network
  • Allow tcp connection on localhost
  • Allow tcp connection from 192.168.1.x network

in /etc/postgresql/9.5/main/pg_hba.conf set:

# IPv4 local connections:
host    all             all               md5
host    all             all             md5

in /etc/postgresql/9.5/main/postgresql.conf set:

listen_addresses = 'localhost,'
port = 5432
max_connections = 80

Out of the box, Odoo connects to a local postgres over UNIX socket via port 5432. This can be overridden using the database options when your Postgres deployment is not local and/or does not use the installation defaults.

The packaged installers will automatically create a new user (odoo) and set it as the database user.

  • The database management screens are protected by the admin_passwd setting. This setting can only be set using configuration files, and is simply checked before performing database alterations. It should be set to a randomly generated value to ensure third parties can not use this interface.
  • All database operations use the database options, including the database management screen. For the database management screen to work requires that the PostgreSQL user have createdb right.
  • Users can always drop databases they own. For the database management screen to be completely non-functional, the PostgreSQL user needs to be created with no-createdb and the database must be owned by a different PostgreSQL user.


    the PostgreSQL user must not be a superuser

  • connect to a PostgreSQL server on
  • port 5432
  • using an ‘odoo’ user account,
  • with ‘pwd’ as a password
  • filtering only db with a name beginning with ‘mycompany’

in /etc/odoo.conf set:

admin_passwd = mysupersecretpassword
db_host =
db_port = 5432
db_user = odoo
db_password = pwd
dbfilter = ^mycompany.*$