Odoo Migration Guide

Migrating Odoo — whether upgrading versions or moving between hosting platforms — is one of the highest-risk operations in an ERP lifecycle. A failed migration can cause data loss, extended downtime, and disrupted business operations. This guide covers the practical steps for planning and executing both types of migration so you can minimize risk and maintain continuity.

Types of Odoo Migration

Odoo migrations fall into three broad categories, each with its own challenges and requirements:

Version Upgrades

Moving from one major version to the next (e.g., 17 to 18, or 18 to 19). Odoo releases a new major version annually, and each version introduces database schema changes, API modifications, and frontend framework updates. Version upgrades require compatibility testing for all installed modules, including custom development.

Hosting Platform Migration

Moving your Odoo instance between hosting environments — for example, from Odoo.sh to a self-hosted server, from a VPS to a dedicated server, or from an on-premise installation to a cloud provider. The Odoo application and database remain the same version, but the infrastructure, networking, and system dependencies change.

ERP Data Migration

Importing data from another ERP system into Odoo. This involves mapping data structures, transforming formats, cleaning legacy data, and validating imports. While not an Odoo-to-Odoo migration, it follows similar principles of planning, testing, and cutover.

Version Upgrade Process

Odoo releases a new major version every year, typically in October. Each version is supported for approximately three years with security patches. Understanding the upgrade lifecycle helps you plan timing and resource allocation.

Standard modules are handled by Odoo's official upgrade service, which processes database schema transformations and data migrations. However, custom modules — and any third-party modules not in the core — require manual adaptation. The three areas that typically change between versions are:

  • →Database schema: New fields, renamed columns, modified constraints, and table restructuring. Custom modules that extend core models may break if the underlying schema changes.
  • →Python API: Deprecated methods are removed, function signatures change, and new ORM features are introduced. Code that relied on removed APIs will fail at runtime.
  • →OWL frontend framework: The JavaScript framework evolves with each release. Custom widgets, views, and client-side code may need rewriting to match the new framework conventions.

Before starting a production upgrade, always request an upgraded test database from Odoo's upgrade service. This gives you a working instance of your data on the target version, allowing you to test custom modules and verify functionality before touching production.

Preparing Custom Modules for Upgrade

Custom modules are the most common source of upgrade failures. Preparation should begin well before the upgrade window:

Freeze Feature Development

Stop new feature development at least two to four weeks before the planned upgrade. Adding new code during this period creates a moving target and increases the chance of regressions. Focus on stabilizing and testing existing functionality.

Audit for Deprecated APIs

Review your custom modules against the target version's release notes. Look for deprecated methods, changed field types, and removed features. Odoo publishes migration guides with each release that document breaking changes.

Test on an Empty Database

Install your custom modules on a fresh database of the target version. This reveals installation errors, view definitions that no longer parse, and model inheritance conflicts. Fix these before attempting to migrate production data.

Write Automated Tests

If your custom modules lack test coverage, now is the time to add it. Automated tests catch regressions that manual testing misses, especially in complex business logic. Run the full test suite on the target version before and after the data migration.

Remove Unused Customizations

Every custom module is a maintenance burden during upgrades. If a customization is no longer used or can be replaced by a standard feature in the target version, remove it. Less custom code means a simpler, faster upgrade.

The Upgrade Workflow

Follow this step-by-step workflow to minimize risk during a version upgrade:

  1. 1.
    Create a full backup of your production database and filestore. Store it in a separate location from your regular backups. Verify the backup can be restored before proceeding.
  2. 2.
    Set up a staging environment with the target Odoo version. This should mirror production infrastructure as closely as possible, including the same server specifications, operating system, and PostgreSQL version.
  3. 3.
    Request an upgraded test database from Odoo's upgrade service. This processes your production database schema and data through the version upgrade pipeline.
  4. 4.
    Adapt custom modules on the staging environment. Fix deprecated API calls, update view definitions, and resolve any compatibility issues identified during testing.
  5. 5.
    Run the full test suite on staging. Verify that all business workflows, reports, and integrations work correctly on the new version. Test edge cases and error handling.
  6. 6.
    Schedule production cutover during a low-traffic period — weekends, holidays, or after business hours. Communicate the downtime window to all users in advance.
  7. 7.
    Verify after go-live. Monitor logs, check critical workflows, and have the team test key functions immediately after the upgrade completes.

Hosting Platform Migration

Moving Odoo between hosting platforms involves transferring the database, filestore, configuration, and any custom system dependencies. The process varies depending on the source and destination:

Odoo.sh to Self-Hosted

Download a complete backup from the Odoo.sh dashboard, which includes the database dump and filestore. Set up a new server with the same Odoo version, restore the database, copy the filestore to the appropriate path, and configure the Odoo configuration file. Update DNS records to point to the new server. Odoo.sh does not provide SSH access to the underlying server, so the backup-and-restore approach is the only migration path.

Self-Hosted to Managed Hosting

Export your database with pg_dump and compress the filestore directory. Provide these to your hosting provider, who restores them on the managed infrastructure. The provider handles server provisioning, PostgreSQL configuration, and SSL setup. You typically get SSH access to manage your Odoo instance while the provider handles the underlying infrastructure.

Self-Hosted to Self-Hosted (Different Provider)

Similar to the managed hosting path, but you handle all infrastructure setup on the new server. Ensure the target server has matching or compatible versions of Python, PostgreSQL, and system libraries. Test the restored instance thoroughly before switching DNS.

Key considerations for any hosting migration include database size (large databases take longer to transfer and restore), filestore size, DNS TTL settings (lower TTL before migration to speed up the switchover), and SSL certificates (provision new certificates on the target server before switching traffic).

Rollback Planning

A rollback plan is your safety net. Before any production cutover, document exactly how to revert to the previous state:

  • →Keep the old database accessible until the new version is fully verified. Do not drop or archive it immediately.
  • →Document the rollback procedure step by step, including database restore commands, DNS changes, and service restarts.
  • →For version upgrades, if the upgraded database has been used in production, a simple restore of the old backup may not be sufficient — data created after the backup would be lost. Plan for this scenario.
  • →Test the rollback procedure on staging before relying on it in production.

Common Migration Pitfalls

These are the mistakes that cause the most problems during migrations:

✕

Skipping the Test Upgrade

Running the upgrade directly on production without testing on staging is the most common cause of migration failures. Always test first.

✕

Not Accounting for Custom Module Compatibility

Standard modules may upgrade cleanly, but custom modules often break. Budget time for adapting custom code, not just testing it.

✕

Migrating During Peak Business Hours

Migrations take longer than expected. Schedule cutover during periods of lowest activity, and communicate the downtime window generously.

✕

Forgetting to Update DNS and SSL

After restoring on a new server, DNS must point to the new IP, and SSL certificates must be valid for the domain. Both are easy to overlook in the rush of a migration.

Related Resources

Migration planning is easier with the right infrastructure and staging tools in place.