I would like to migrate data from Odoo 9 community to Odoo 11 community. So I want to write some migration scripts. But, currently I have no idea how I can write a migration script like OpenUpgrade.
How I can use PostreSQL to migrate data from Odoo 9 to Odoo 11.
Can I migrate data by connecting OdooRPC of both versions?
If anyone have idea where to start then please share your ideas.
You can migrate data in several ways. But you need to know Odoo very well to make such migration.
Raw SQL scripts. If you are an SQL expert this could be a good way to map fields. Take into account that depending on your installed modules Odoo could use up to 500 tables or even more.
ETL tools such as Pentaho Kettle. This is a costly way as well, but it has a GUI.
Openupgrade. It offers migrations script (python) for the main Odoo modules. You would have to write your own migrations scripts for your custom modules and third parties modules (if they do not have them). You would need to follow these steps:
migrations
folder) to update the database structure from the version 9.0 to the 10.0 and to the version and 11.0. You can check examples of these kind of scripts in the Openupgrade project, they execute SQL code very often.However, I have never made a complete migration using these methods because they are very costly. So my recommendation is to migrate the database partially, only the essential data (if you want a stable installation). You can even work with csv files, exporting those tables and reimporting them into the new database.