Skip to main content

Docker-based Odoo database migration tool using OpenUpgrade framework

Project description

OdooUpgrade

Python Version License: MIT Docker

Professional command-line tool for automating Odoo database upgrades using OCA's OpenUpgrade framework. Seamlessly upgrade your Odoo databases from version 10.0 through 18.0 with a single command.

โœจ Features

  • ๐Ÿš€ Automated Incremental Upgrades: Automatically handles multi-step upgrades
  • ๐Ÿ“ฆ Multiple Source Formats: Supports both .zip and .dump database files
  • ๐ŸŒ Remote Downloads: Download databases directly from URLs
  • ๐Ÿณ Docker-Based: Uses containerized environments for safe, isolated upgrades
  • ๐Ÿ“Š Rich CLI Output: Beautiful progress bars and status indicators using Rich library
  • ๐Ÿ”„ Resume Support: Intelligent version detection to continue from current state
  • ๐Ÿ“ Detailed Logging: Optional verbose mode and log file support
  • โœ… Validation: Pre-flight checks for source accessibility and Docker availability

๐Ÿ“‹ Requirements

  • Python: 3.9 or higher
  • Docker: Docker Engine with Docker Compose (v2) or docker-compose (v1)
  • Operating System: Linux, macOS, or Windows (with WSL2 for best results)
  • Disk Space: Minimum 5GB free space for Docker volumes and temporary files

๐Ÿš€ Installation

Using pip (Recommended)

pip install odooupgrader

From Source

git clone https://github.com/fasilwdr/OdooUpgrader.git
cd OdooUpgrader
pip install -e .

๐Ÿ“– Usage

Basic Usage

Upgrade a local database file to version 16.0:

odooupgrader --source /path/to/database.zip --version 16.0

Download and Upgrade from URL

odooupgrader --source https://example.com/database.dump --version 17.0

Specify PostgreSQL Version

odooupgrader --source /path/to/database.zip --version 16.0 --postgres-version 15

Enable Verbose Logging

odooupgrader --source /path/to/database.zip --version 18.0 --verbose

Save Logs to File

odooupgrader --source /path/to/database.zip --version 15.0 --log-file upgrade.log

๐ŸŽฏ Command-Line Options

Option Required Description
--source โœ… Path to local .zip/.dump file or URL to download
--version โœ… Target Odoo version (10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0)
--postgres-version โŒ PostgreSQL version for the database container (default: 13)
--verbose โŒ Enable verbose logging output
--log-file โŒ Path to save detailed log file

๐Ÿ”„ How It Works

  1. Validation: Checks if source file/URL is accessible and Docker is available
  2. Environment Setup: Creates necessary directories and PostgreSQL container
  3. Source Processing: Downloads (if URL) and extracts the database
  4. Database Restoration: Restores database and filestore to PostgreSQL
  5. Version Detection: Determines current database version
  6. Incremental Upgrades: Runs OpenUpgrade for each version step
  7. Package Creation: Creates final .zip with upgraded database and filestore

๐Ÿ“ Output Structure

After successful upgrade, you'll find in the output directory:

output/
โ”œโ”€โ”€ upgraded.zip          # Final packaged database (ready to restore)
โ””โ”€โ”€ odoo.log             # Upgrade process logs

๐Ÿ” Supported Versions

This tool supports upgrading Odoo databases from version 10.0 through 18.0. The upgrade paths and compatibility are determined by the OCA OpenUpgrade project, which maintains migration scripts for each Odoo version.

๐Ÿค Contributing

Contributions are welcome!

๐Ÿ” Security Considerations

  • Database credentials are hardcoded for the temporary Docker container
  • The PostgreSQL container is on an isolated Docker network
  • No ports are exposed to the host machine
  • Containers are automatically cleaned up after upgrade
  • Consider using this tool in isolated environments for production databases

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ“ž Support

๐Ÿ“ˆ Changelog

Version 0.1.0 (Initial Release)

  • โœจ Initial release with core upgrade functionality
  • โœ… Support for Odoo versions 10.0 through 18.0
  • ๐Ÿณ Docker-based isolated upgrade environment
  • ๐Ÿ“Š Rich CLI output with progress indicators
  • ๐ŸŒ URL download support for remote databases
  • ๐Ÿ“ฆ Automatic packaging of upgraded databases

Made with โค๏ธ by Fasil | Powered by OpenUpgrade

โญ If you find this tool helpful, please star the repository!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odooupgrader-0.1.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odooupgrader-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file odooupgrader-0.1.0.tar.gz.

File metadata

  • Download URL: odooupgrader-0.1.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for odooupgrader-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d96736ee0be31b51a789ce1e30c140f30210912fff2e79b740fbfd2d1688ed4d
MD5 19d3ac18069c43129a28294947a84ee0
BLAKE2b-256 c4b8fe3dd5a6cddf09cf5e0f801e40d6cca50e6aad3a68086f792e55b277d7e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for odooupgrader-0.1.0.tar.gz:

Publisher: publish-pypi.yml on fasilwdr/OdooUpgrader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file odooupgrader-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: odooupgrader-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for odooupgrader-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f21f233faab3ca2dabe29e7388f1e6f39d9e7c55379fe2e3c7f04d56e80ca132
MD5 005527e3eef63d5ca9083ce6fc8cfb83
BLAKE2b-256 3bacd01d614b342fe115553a54cd50bed4ea76a70152232d9a564bcbfcb96b72

See more details on using hashes here.

Provenance

The following attestation bundles were made for odooupgrader-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on fasilwdr/OdooUpgrader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page