Odoo Help


Possible to move database from windows ver. to Ubunto installation?

Mats Kjellberg
on 10/20/13, 8:18 PM 2,263 views

Possible to move database from windows version to Ubunto installation? How to do?


Brett Lehrer

--Brett Lehrer--

| 5 5 8
Milwaukee, United States
--Brett Lehrer--
Director of IT and open source enthusiast.
Brett Lehrer
On 10/21/13, 3:44 PM

I haven't personally done this, but I would imagine you run pg_dump on the current database and save it to a file, then move that database into your target Ubuntu server and import it. You may need to ensure the postgres versions match when importing, but I'm not sure about that. Nobody can be accessing the database when you do this, so OpenERP needs to be shut down and any tools like pgAdmin can't be running.

export on windows cmd line, navigate to the folder pg_dump.exe is sitting in:

pg_dump -C my_database_name -f my_db.sql

import on ubuntu:

psql -U openerp -d postgres -f my_db.sql

openerp is just the name of the database user in postgres on Ubuntu, that depends on your setup but it's a common one to use. The use of -C prepares the dump to create a new database when executing the file in psql.

a '-f' is missing in the export command. In addition, good to mention the username (openpg in my standard windows 8 installation). Thus command is: pg_dump -C -f my_database_name -U username -f my_db.sql

on 11/22/15, 3:40 AM

In addition, I tried an export from a French odoo installation to a Debian one () In addition, I add to remove : the LC_COLLATE and the LC_CTYPE of the CREATE database instruction before importing to debian.

on 11/22/15, 3:48 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/20/13, 8:18 PM
Seen: 2263 times
Last updated: 3/16/15, 8:10 AM