Odoo : How To Migrate the PostgreSQL Database To A New Server


Application Server   -  Odoo Server
Database Server      -  Postgresql Server

In Database server

Install postgresql

#  sudo apt-get update
# sudo apt-get install postgresql postgresql-contrib postgresql-client

Create odoo user

# createuser --superuser odoo

Create database

# createdb omegha-odoo

Now login to psql

# psql

Change the ownership of database to odoo user.

postgres-# ALTER DATABASE "omegha-odoo" OWNER TO odoo;

Edit the following configuration files


# -----------------------------
# PostgreSQL Client Authentication Configuration File
# ===================================================

# IPv4 local connections:
host    all     all        trust


# -----------------------------
# PostgreSQL configuration file
# -----------------------------

listen_addresses = '*'

Restart postgresql service

# service postgresql restart

In Application Server

 Edit the following configuration file


db_host = <ip-address of the database server>
db_name = omegha-odoo
db_password = 
db_port = 5432
db_user = odoo

# service odoo restart
Facebook Comments