Odoo ERP

Odoo Backup Strategy: Database, Filestore and Restore Drills

A working Odoo backup strategy covers the database dump, the filestore, off-site copies, and a restore you have actually tested.

Tech After Me CEOCEO & Odoo ConsultantPublished 6 min read
Share
Odoo Backup Strategy: Database, Filestore and Restore Drills
On this page

Most Odoo backup strategies fail at the moment they are needed. Not because nobody takes backups, but because nobody has restored one recently. A nightly cron job that dumps the database and stores a file somewhere is not an Odoo backup strategy. It is a backup habit, and the two are different things.

A real Odoo backup strategy has four parts: the database dump, the filestore, an off-site copy, and a restore drill on a schedule. Skip any one of those and the first real recovery attempt is where you find out what was missing. We build this into every Odoo deployment we set up, whether it runs on Odoo.sh or on a VPS we manage directly.

Why database backups alone are not enough

An Odoo database dump is a structured export of every record: invoices, partners, stock moves, sales orders, configuration, access rights. It is what most people picture when they say "backup." But Odoo stores binary files separately, in the filestore, which lives on disk outside the database. PDF invoices, product images, uploaded attachments, email attachments synced through the mail gateway, and signed documents all live there. Each one is referenced by a file path recorded in the database.

Restore the database without the filestore and the application comes back, but attachments show broken links. Invoices that were previously generated will not reopen as PDFs. Product images disappear. For a company using e-Tax invoice and e-Receipt workflows, this matters directly. The generated tax documents are filestore attachments, not just database rows.

The rule we follow: database and filestore are backed up together, on the same schedule, and restored together. Never one without the other.

What a complete Odoo backup set contains

A complete backup set for a production Odoo instance includes:

  • The PostgreSQL database dump, in custom format rather than plain SQL, since custom format restores faster and supports selective restore
  • The filestore directory for that database, matched to the same point in time as the dump
  • The Odoo configuration file and any custom module code, if it is not already in version control
  • A manifest noting the Odoo version, the database name, and the date, so a restore six months later does not start with guesswork

That last point sounds minor until you are the person restoring a backup from an unfamiliar server at 11 p.m. The only files you have are named backup_final_v2.tar.gz.

Off-site copies: the part people skip

A backup stored on the same server it protects is not a disaster recovery plan. If the VPS disk fails, gets encrypted by ransomware, or the hosting account is suspended, a backup sitting in /var/backups on that same machine is gone with it.

We push backups to a separate location: an object storage bucket, a second cloud account, or a different physical server, ideally with a different provider from production. For companies with offices across Thailand, the USA and India, read more about our team, we also think about which region the backup lands in. Recovery time depends partly on how far the restore has to travel over the network.

The trade-off here is cost and complexity. Off-site storage is cheap by volume but adds a moving part: credentials to manage, a transfer job that can fail silently, and a bill that grows as retention windows grow. We would rather pay for that complexity than discover, during an actual outage, that the only copy of the database was on the machine that just died.

Odoo backup strategy without restore drills is just a guess

A backup that has never been restored is a theory, not a plan. We test restores on a recurring schedule, not just after someone asks whether this actually works.

A restore drill means:

  1. Pick a recent backup set: database dump plus matching filestore.
  2. Spin up a clean Odoo instance on the same major version as production.
  3. Restore the database and point the filestore path at the recovered files.
  4. Log in, open a recent invoice, check stock quantities, confirm attachments open.
  5. Time the whole process and write the time down.

That last step matters more than it sounds. A restore that technically works but takes six hours is a different business decision than one that takes twenty minutes. This is especially true when you are quoting a recovery time to the rest of the company. We run these drills quarterly for production systems under our Odoo deployment services, and more often right after a major configuration change or an Odoo upgrade. That is when untested assumptions tend to surface.

Odoo.sh versus a VPS: what recovery actually looks like

The two hosting paths we work with most differ meaningfully in what recovery involves.

Odoo.shSelf-managed VPS
Automatic backupsYes, on production branches, with platform-managed retentionNo, you configure the cron job and retention yourself
Filestore includedYes, bundled with the database backupOnly if you script it to be
Restore methodDownload or restore through the dashboard to a branchManual restore of dump and filestore to the server
Off-site copyStill your responsibility to pull a copy outYour responsibility from the start
Full control over retention and formatLimited to platform optionsComplete

Odoo.sh removes a real amount of operational work. The nightly job runs without you writing it, and the filestore is already bundled with the database snapshot. What it does not remove is the need for an off-site copy outside the platform, and it does not remove the need to drill the restore. A platform backup you have never pulled down and loaded elsewhere is still untested.

A VPS gives full control over format, retention and destination, at the cost of building and maintaining the backup job yourself. VPS backup jobs can quietly stop running for weeks after a disk fills up or a credential expires, with no alert because nobody set one. If you self-host, monitoring the backup job itself, not just running it, is part of the strategy.

Retention: what to actually keep

More backups are not automatically better. They are mostly a storage cost with occasional value. A retention pattern that works for most companies:

  • Daily backups kept for two to four weeks, for the "someone deleted the wrong record yesterday" case
  • Weekly backups kept for a few months, for slower-to-notice problems like a bad import
  • Monthly backups kept for a year, mainly for audit and year-end reference, including financial close (งบการเงิน) questions that sometimes surface months later

Encrypt backups at rest, especially off-site copies. A database dump contains customer contact details, invoice amounts and sometimes payment references. An unencrypted backup sitting in a storage bucket is a data exposure risk in its own right, separate from whether it restores correctly.

Where Odoo backup strategy connects to the rest of deployment

Backup planning should not happen as an afterthought once a system is already live. We cover it during the initial deployment conversation alongside server sizing, worker configuration and the go-live plan under Odoo implementation services. Retrofitting a real backup strategy onto a system that has run unprotected for a year usually means doing a restore drill for the first time under pressure, which defeats the purpose.

If you are planning a new Odoo deployment, or reviewing one that has never had its backups tested, start with a single restore drill this month. Pick a recent backup, restore it somewhere clean, and time it. Whatever that drill tells you will be more useful than another month of backups you have not opened.

Share

Frequently asked questions

How often should an Odoo database be backed up?

For most companies running daily transactions, a nightly database dump plus a filestore copy is the baseline. If invoices, POS sessions or stock moves happen continuously through the day, we add a midday backup so the worst-case data loss is a few hours rather than a full day.

Does Odoo.sh back up the filestore automatically?

Odoo.sh takes automatic backups of the database and the attached filestore for production branches, with a retention window that depends on your plan. We still recommend pulling a periodic copy to storage you control, since platform backups protect you from data loss but not from losing access to the platform itself.

What is the difference between a database dump and a filestore backup?

The database dump holds structured records: invoices, contacts, stock moves, configuration. The filestore holds binary files such as PDF invoices, product images and uploaded attachments, referenced by the database but stored separately on disk. Restoring one without the other leaves broken links or missing records.

Can we restore an Odoo backup to a different server or version?

Restoring to different hardware is routine and is exactly what a disaster recovery plan requires. Restoring to a different Odoo version is not supported directly; a database dump from Odoo 17 will not load cleanly into an Odoo 18 instance without going through an upgrade process first.

How long should we keep old backups?

We typically keep daily backups for two to four weeks, weekly backups for a few months, and at least one monthly backup for a year, mainly to cover cases where a data problem is discovered well after it happened, such as a bad import that was not noticed for weeks.

Sources

About the author

Tech After Me CEO

CEO & Odoo Consultant

The CEO of Tech After Me implements, customizes and supports Odoo ERP and builds web, mobile and data products for companies in Thailand, the USA and India.

More from this author

Keep reading

Odoo API Integration: XML-RPC, JSON-RPC and Auth BasicsOdoo ERP

Odoo API Integration: XML-RPC, JSON-RPC and Auth Basics

A practical guide to Odoo API integration: how authentication, XML-RPC and JSON-RPC calls work, and the patterns that keep external systems reliably in sync.

Tech After Me CEO6 min read

Put what you read into practice

The team writing these guides is the same team that ships them. Tell us what you are working on.

Get new articles in your inbox

Get new articles in your inbox

Odoo guides and IT news that matter to your business. At most one email a week.