+5 votes
2.4k views
Hello
I have a server odoo 10 and I want to switch to odoo 12. I installed the new version on another server.

1. How do I export my odoo 10 database?
2. How do I import my odoo 10 database to version 12?

Thank you for your help.
in Server by (500 points) | 2.4k views

1 Answer

+3 votes
Best answer

hello 

If you are an enterprise customer, check Odoo's upgrade service here: https://upgrade.odoo.com/database/upload.

For your's Database Migration

you can use Open Upgrade: https://github.com/OCA/OpenUpgrade

For your's code migration you need to be aware for changelogs of odoo versions & you need to maintain that changes in you customized modules.

by (4.6k points)
selected by

Thanks, I have the community version. And I have no specific development. Is there a simple way to migrate data?

You can not direct migrate v10 to v12.  First you need to migrate in v11 and then in v12.

Basically these are the steps :

a) First You need to download two openupgrade libraby,

 1) https://github.com/OCA/OpenUpgrade/tree/10.0

 2) https://github.com/OCA/OpenUpgrade/tree/11.0

b) Install openupgradelib.

 1) Download openupgradelib from https://pypi.python.org/pypi/openupgradelib

 2) Install with command : sudo python setup.py install

c) Run Automated Migration script

 1) Go to specific path of openupgrade where you find 'migrate.py' file

 2) python migrate.py --config=[your openerp.conf] --database=[your database] --run-migrations=[your migrations]

 --config = v11 config file(in which version you want to migrate)

 --database = database which we would like to migrate(installed database)

 --run-migrations = version in which you would like to migration

d) 'migration.log' file is created for error tracking.

e) If any error occured while migration script is running, need to solve explicitly the problem(by psql) and run migration script again.

f) New database is created in v11 'databasename_migrated' with '_migrated'.

If any error occured you must reapet this steps to migrate to v12

Let me know the result

why we can not directly migrate v10 to v12.

in v13, the file migrate.py no exists?, how I migrate in this case,

python migrate.py --config=[your openerp.conf] --database=[your database] --run-migrations=[your migrations]

205 questions
180 answers
37 comments
222,966 users