Migrate from Self-Hosted Odoo
Move your existing self-hosted Odoo installation to OEC.sh for easier management, automated backups, and professional monitoring.
Overview
Migrating from a self-hosted Odoo installation involves:
- Creating a backup of your database and filestore
- Uploading to cloud storage
- Importing into OEC.sh
Same Version Required: You must migrate to the same Odoo version. Version upgrades require Odoo's paid upgrade service (Enterprise only).
Prerequisites
- SSH access to your current server
- Database credentials (PostgreSQL user/password)
- OEC.sh account with a server configured
- Cloud storage configured (S3, R2, or B2)
- Sufficient disk space for backup creation
Step 1: Create Backup on Source Server
SSH into your current Odoo server and create a complete backup.
Find Your Odoo Configuration
# Common locations for odoo.conf
cat /etc/odoo/odoo.conf
# or
cat /etc/odoo-server.conf
# or
cat ~/.odoorcNote these values:
db_name- Your database namedata_dir- Location of filestore (usually/var/lib/odooor~/.local/share/Odoo)
Create Database Dump
# Create backup directory
mkdir -p ~/odoo_backup
# Dump the database
pg_dump -U odoo -h localhost YOUR_DATABASE_NAME -F c -f ~/odoo_backup/dump.sql
# Or for plain SQL format
pg_dump -U odoo -h localhost YOUR_DATABASE_NAME > ~/odoo_backup/dump.sqlReplace YOUR_DATABASE_NAME with your actual database name. The user (-U odoo) may differ based on your setup.
Copy Filestore
# Find your filestore location
ls -la /var/lib/odoo/filestore/
# or
ls -la ~/.local/share/Odoo/filestore/
# Copy filestore to backup directory
cp -r /var/lib/odoo/filestore/YOUR_DATABASE_NAME ~/odoo_backup/filestoreCreate Backup Archive
cd ~/odoo_backup
# Create ZIP archive (OEC.sh compatible format)
zip -r odoo_backup_$(date +%Y%m%d).zip dump.sql filestore/
# Check the file size
ls -lh odoo_backup_*.zipStep 2: Upload to Cloud Storage
Transfer your backup to cloud storage for import into OEC.sh.
AWS CLI (for S3/R2):
# Install AWS CLI if needed
apt install awscli -y
# Configure credentials
aws configure
# Upload to S3
aws s3 cp ~/odoo_backup/odoo_backup_*.zip s3://your-bucket/migrations/
# For Cloudflare R2
aws s3 cp ~/odoo_backup/odoo_backup_*.zip s3://your-bucket/migrations/ \
--endpoint-url https://ACCOUNT_ID.r2.cloudflarestorage.comStep 3: Import into OEC.sh
Configure Storage Provider
If not already done:
- Go to Settings → Storage Providers
- Add your cloud storage credentials
- Test the connection
Create New Project
- Go to Projects
- Click New Project
- Select Migrate from Backup
Select Backup Source
- Choose your storage provider
- Navigate to your backup file
- Click Validate
OEC.sh will detect:
- Odoo version (from dump.sql)
- Database size
- Filestore size
Configure Environment
- Set project name
- Select matching Odoo version
- Choose target server
- Allocate resources (CPU, RAM, disk)
Start Migration
Click Start Migration to begin the import process.
Step 4: Post-Migration Configuration
Update System Parameters
- Access your new Odoo instance
- Go to Settings → Technical → System Parameters
- Update these parameters:
| Parameter | New Value |
|---|---|
web.base.url | https://your-new-domain.com |
web.base.url.freeze | True |
mail.catchall.domain | Your email domain |
Configure Outgoing Email
- Go to Settings → General Settings
- Configure outgoing mail server
- Test email delivery
Update DNS
If keeping your domain:
- Update A record to point to new server IP
- Or add domain in Environment → Domains
Verify Scheduled Actions
- Go to Settings → Technical → Scheduled Actions
- Check all cron jobs are active
- Verify next execution times
Large Database Considerations
For databases larger than 10GB:
Before Migration
-
Clean up data:
-- Remove old mail messages (keep last 6 months) DELETE FROM mail_message WHERE date < NOW() - INTERVAL '6 months' AND model != 'mail.channel'; -- Clean ir.logging TRUNCATE ir_logging; -- Vacuum the database VACUUM FULL ANALYZE; -
Archive old attachments:
-- Find large attachments SELECT name, pg_size_pretty(file_size) FROM ir_attachment ORDER BY file_size DESC LIMIT 20;
During Migration
- Use a server with sufficient RAM (at least 8GB)
- Allow extra time for restore
- Monitor disk space during import
Handling Custom Modules
Identify Custom Modules
On your source server:
# List addon paths from config
grep addons_path /etc/odoo/odoo.conf
# List installed modules
psql -U odoo -d YOUR_DATABASE -c "SELECT name FROM ir_module_module WHERE state = 'installed';"Transfer Custom Modules
-
Copy your custom modules:
tar -czvf custom_addons.tar.gz /path/to/custom/addons/ -
In OEC.sh, add as addon repository:
- Go to Project → Repositories
- Add your Git repository containing custom modules
- Or upload directly to the environment
Common Issues
Permission Denied During pg_dump
# Switch to postgres user
sudo -u postgres pg_dump YOUR_DATABASE > dump.sqlFilestore Not Found
Check Odoo data directory:
grep data_dir /etc/odoo/odoo.conf
# Default: /var/lib/odoo or ~/.local/share/OdooVersion Detection Failed
Manually check your Odoo version:
# From Python
python3 -c "import odoo; print(odoo.release.version)"
# Or check installed package
dpkg -l | grep odooImport Timeout
For very large databases:
- Contact OEC.sh support
- Consider splitting into database + filestore imports
- Use a high-spec server for initial import
Verification Checklist
After migration, verify:
- Admin and user logins work
- All data is present (spot check key records)
- Attachments and images load correctly
- Custom modules function properly
- Reports generate correctly
- Email sending/receiving works
- Scheduled actions execute properly
- Integrations (payment, shipping) work
Decommissioning Old Server
Once verified:
- Keep old server running for at least 2 weeks
- Create final backup on old server
- Update DNS to point to new server
- Monitor for any missed configurations
- Shut down old server after confirmation
- Delete old server after retention period
Tip: Keep your final backup stored securely for at least 90 days after migration.
Need Help?
For migration assistance:
- Email: [email protected]
- Include: Current Odoo version, database size, any custom modules