Odoo Backup and Restore: Do It Before You Need It
How to back up and restore Odoo: database and filestore, automated off-site backups, Odoo.sh and Odoo Online options, retention and how to test a restore.
Every Odoo system will one day need a restore: a bad import, a failed upgrade, a server failure. The only question is whether the backup works when you need it.
What to back up
An Odoo instance has two parts:
- The PostgreSQL database with all records.
- The filestore with attachments, product images, PDFs and documents.
You need both. Restoring the database alone leaves broken attachments everywhere. Also keep a copy of your custom modules and the Odoo configuration file, ideally in Git.
Backup options by hosting type
- Odoo Online: Odoo manages backups. You can download a backup from the database manager.
- Odoo.sh: automatic daily backups with retention, plus manual backups before risky changes.
- Self-hosted: your responsibility. Use
pg_dumpfor the database and copy the filestore, or use Odoo's backup endpoint, on a schedule.
Follow the 3-2-1 rule
Keep three copies of your data, on two types of storage, with one off-site. For self-hosted Odoo, that typically means the live server, a local backup and an encrypted copy in cloud storage in another region.
Retention
A sensible starting point:
- Daily backups kept for 14 days
- Weekly backups kept for 2 months
- Monthly backups kept for a year
Adjust for legal requirements in your country.
Test the restore
A backup you have never restored is a hope, not a backup. Every quarter:
- Restore the latest backup to a separate server.
- Log in and open records with attachments.
- Check the date of the latest records.
- Record how long it took.
Neutralise the restored copy so it does not send emails or connect to live payment and shipping services.
Before risky changes
Always take a manual backup before imports, module installs and upgrades. It takes minutes and can save days.
Security
Backups contain everything: customers, prices, payroll. Encrypt them, restrict access and disable the public database manager on production servers. See our Odoo security best practices.
If you want backups handled for you, our Odoo hosting and ERP maintenance services include monitored, tested backups.
Frequently asked questions
What does an Odoo backup need to include?
Both the PostgreSQL database and the filestore. The filestore holds attachments, images and documents. A database without it is incomplete.
Does Odoo.sh back up automatically?
Yes. Odoo.sh keeps automatic backups of production. You can also download backups for your own off-site copy.
Written by
ERP Builders Architecture Group · Solution architecture
The engineers responsible for integration design, data migration tooling and performance work across ERP Builders projects.
Related articles
How to Install Odoo Community (Docker and Ubuntu)
Step-by-step Odoo Community installation using Docker for testing and Ubuntu for production, with the configuration, reverse proxy and backup steps most guides leave out.
Odoo Security Best Practices: A Checklist
An Odoo security checklist: HTTPS, database manager, admin passwords, two-factor login, access rights, API keys, updates, backups and log monitoring.
Odoo Hosting Options: Online vs Odoo.sh vs Self-Hosted
Comparing Odoo Online, Odoo.sh and self-hosting on cloud or on-premise servers: custom modules, control, performance, backups, upgrades and which suits which business.
Next step
Turn the plan into a working system.
Book a consultation with an ERP consultant. No sales script — just an honest look at your situation.