Docker-based Odoo database migration tool using OpenUpgrade framework
Project description
OdooUpgrade
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
.zipand.dumpdatabase 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
- Validation: Checks if source file/URL is accessible and Docker is available
- Environment Setup: Creates necessary directories and PostgreSQL container
- Source Processing: Downloads (if URL) and extracts the database
- Database Restoration: Restores database and filestore to PostgreSQL
- Version Detection: Determines current database version
- Incremental Upgrades: Runs OpenUpgrade for each version step
- Package Creation: Creates final
.zipwith 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
- OCA (Odoo Community Association) for the OpenUpgrade framework
- OpenUpgrade Project for migration scripts
๐ Support
- Issues: GitHub Issues
- Email: fasilwdr@hotmail.com
๐ 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d96736ee0be31b51a789ce1e30c140f30210912fff2e79b740fbfd2d1688ed4d
|
|
| MD5 |
19d3ac18069c43129a28294947a84ee0
|
|
| BLAKE2b-256 |
c4b8fe3dd5a6cddf09cf5e0f801e40d6cca50e6aad3a68086f792e55b277d7e5
|
Provenance
The following attestation bundles were made for odooupgrader-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on fasilwdr/OdooUpgrader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odooupgrader-0.1.0.tar.gz -
Subject digest:
d96736ee0be31b51a789ce1e30c140f30210912fff2e79b740fbfd2d1688ed4d - Sigstore transparency entry: 736352995
- Sigstore integration time:
-
Permalink:
fasilwdr/OdooUpgrader@ace95e0d46d68074c9444c10007143e8224b8961 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/fasilwdr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ace95e0d46d68074c9444c10007143e8224b8961 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f21f233faab3ca2dabe29e7388f1e6f39d9e7c55379fe2e3c7f04d56e80ca132
|
|
| MD5 |
005527e3eef63d5ca9083ce6fc8cfb83
|
|
| BLAKE2b-256 |
3bacd01d614b342fe115553a54cd50bed4ea76a70152232d9a564bcbfcb96b72
|
Provenance
The following attestation bundles were made for odooupgrader-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on fasilwdr/OdooUpgrader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odooupgrader-0.1.0-py3-none-any.whl -
Subject digest:
f21f233faab3ca2dabe29e7388f1e6f39d9e7c55379fe2e3c7f04d56e80ca132 - Sigstore transparency entry: 736352997
- Sigstore integration time:
-
Permalink:
fasilwdr/OdooUpgrader@ace95e0d46d68074c9444c10007143e8224b8961 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/fasilwdr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ace95e0d46d68074c9444c10007143e8224b8961 -
Trigger Event:
release
-
Statement type: