A free, battle-tested bash script that automates PostgreSQL dumps, filestore compression, and rotation policies—protecting your Odoo data without expensive backup solutions.
Manual Odoo backups are error-prone and time-consuming. A missed backup or corrupted archive can cost your business days of data and thousands in revenue. According to our analysis of 200+ production incidents, 67% of Odoo data loss events could have been prevented with automated, verified backups.
Get up and running in under 5 minutes with these simple steps:
wget https://ariashaw.com/assets/downloads/enhanced_backup_odoo.sh && chmod +x enhanced_backup_odoo.sh
nano enhanced_backup_odoo.sh # Edit DB_NAME, DB_USER, BACKUP_DIR variables
./enhanced_backup_odoo.sh --dry-run
crontab -e # Add: 0 2 * * * /path/to/enhanced_backup_odoo.sh
Here's how real companies are using this script in production:
Reduced backup window from 45 minutes to 12 minutes using parallel pg_dump jobs. Saved $240/month by eliminating third-party backup service.
Restored full operations in 4 hours using 2-day-old backup. Verified backup integrity prevented 6-hour restore failure that would have required week-old backup.
This production script is production-ready and has helped thousands of Odoo deployments. However, it's designed as a starting point, not a complete enterprise solution.
Based on 200+ support requests, here are the most common questions about this script:
This error typically means the script isn't executable. Run 'chmod +x enhanced_backup_odoo.sh' after downloading. If the error persists, check that the BACKUP_DIR path is writable by your user: 'ls -ld /path/to/backup/dir'. You may need to run 'sudo chown $USER:$USER /backup/path'.
Small backup sizes are usually normal due to compression. To verify integrity, run: 'pg_restore --list backup.dump | head'. You should see a table listing. For filestore archives, use: 'tar -tzf filestore.tar.gz | wc -l' to count files. Compare this to your actual filestore directory.
This free script handles one database at a time. For multi-database environments, either run the script multiple times with different DB_NAME values, or upgrade to the Master Pack's Multi-Instance Backup Orchestrator which manages multiple databases, coordinates timing, and consolidates logs.
Yes, by default this script backs up both the PostgreSQL database and the Odoo filestore directory. You can disable filestore backup by setting BACKUP_FILESTORE=false in the configuration section.
Use pg_restore for the database: 'pg_restore -d your_db backup.dump'. For the filestore: 'tar -xzf filestore.tar.gz -C /path/to/odoo/data/filestore/'. See our Emergency Restore Guide for detailed step-by-step instructions including service stops and permission fixes.
The Odoo Digital Sovereignty Master Pack transforms this free tool into a complete, enterprise-grade system that scales with your business.
Investment: $699 one-time payment (not subscription)
What you avoid: $15,000-$50,000 in consultant fees + months of trial-and-error
Includes: 5 comprehensive modules with 68+ integrated tools, 2,000+ pages of documentation, and direct email support
View Master Pack Details →Explore other production-ready scripts and tools: