Odoo backups done right: daily backups, restore tests and offsite copies
What a complete Odoo backup contains, how long to keep backups, why a backup only counts once it has been restored, and how encrypted offsite copies protect you from losing a whole server.
By Odoo Cloud · Published · 6 min read · Backups, Odoo hosting, Security
Nobody thinks about backups until the day they need one. On that day, three questions decide whether it is an inconvenience or a disaster: does the backup contain everything, is it recent enough, and does it actually restore? This article walks through each one for Odoo, and shows how Odoo Cloud answers them.
What an Odoo backup must contain
An Odoo database lives in two places:
- The PostgreSQL database: every record, from partners to journal entries.
- The filestore: attachments, product images, scanned documents and generated PDFs. Odoo stores these as files on disk, not in the database.
A backup of the database alone restores an Odoo where every attachment is missing. That is surprisingly easy to miss, because everything looks fine until someone opens an invoice's PDF.
The standard Odoo backup format bundles both: a zip with dump.sql, the filestore folder and a manifest.json describing the database. It is what Odoo's database manager produces and restores, and it is the format Odoo Cloud uses for every backup. Production backups also include Odoo's HTTP sessions when that folder is small, so a restore into production doesn't log everyone out; they are ignored by Odoo's database manager, so the zip still imports anywhere.
How often, and for how long
Two numbers describe a backup policy:
- How much work you can afford to lose sets the frequency. Daily backups mean at most a day of work to re-enter in the worst case.
- How far back you may need to go sets the retention. Many problems are discovered late: a wrong import noticed at month end, a deleted product found at the next stock count.
Keeping every daily backup forever is expensive; keeping only the last week is risky. A rotation gives you both recent and older restore points:
| Kind | Kept | Covers |
|---|---|---|
| Daily | 7 | The last week, day by day |
| Weekly | 4 | The last month |
| Monthly | 3 | About three months |
That is the rotation Odoo Cloud applies to every production database. On top of it:
- Update backups. Before modules are updated in production, a backup is taken. If the update fails, it is restored automatically and the previous build starts again. The last five are kept.
- Manual backups. Back up now makes a backup whenever you want one, for example before a large import. Manual backups are kept for three days, up to five a day.
Staging and development aren't backed up automatically: they are copies, and can be rebuilt from production.
A backup only counts once it has been restored
Backups fail silently. A dump interrupted by a full disk, a filestore copied while half-written, a permissions problem that leaves some files out: none of these show up until you try to restore.
The only reliable check is to restore. On Odoo Cloud, about once a week for each project, the newest daily production backup is restored into a temporary database and checked:
- The zip is opened, and the filestore must hold as many files as the backup's manifest says.
- The dump is loaded into a temporary database with the project's own database role, exactly like a real restore.
- Sanity queries run on it: Odoo's base module is installed, there are users, and a random sample of attachments is found in the filestore, with part of the sample read in full.
- If the backup has an offsite copy, its size must match the local zip.
The temporary database is then dropped, and the result is shown on the backup in the Backups tab. A failure notifies the project's admins by email and in the app. You can also start a check yourself with Verify now.
Restore tests run at night, at low priority, and never touch your production database or files.
Offsite copies, encrypted
A backup on the same server as production protects you from mistakes: a bad import, a deleted record, a failed update. It doesn't protect you from losing the server itself. For that you need a copy somewhere else.
When the platform's offsite storage is configured, every daily and update backup is copied to a second location after it is made:
- Encrypted before it leaves. Each file goes through encryption on the server before upload, so the storage provider only sees encrypted names and contents.
- Same retention. The offsite copies follow the local rotation: when a backup is pruned locally, its remote copy is deleted too.
- Visible. Each backup shows its offsite status (copied, uploading, or failed, with a Retry button), and the project's Status page shows when the last copy was made.
- Restorable. If the local zip is gone, Restore downloads it back from the offsite copy first.
This is the classic "3-2-1" idea in practice: several copies, on more than one kind of storage, with one of them in another location.
Restoring without fear
The safest restore is one that doesn't touch production. In the Backups tab, Restore any production backup into a staging branch: it is restored as a neutralized copy, with emails caught and scheduled actions off. That is ideal for "what did this record look like last Tuesday?" questions, and for copying a few records back by hand.
Restoring into production puts it back exactly as it was at the time of the backup; anything done since is lost. Take a Back up now first, so that you can change your mind.
Your own copy
Whatever your provider promises, keep the ability to leave. Every backup on Odoo Cloud can be downloaded, with or without the filestore, as a standard Odoo backup that Odoo's own database manager can restore anywhere. Some teams download a monthly copy to their own storage as a matter of policy; for regulated businesses it is often a requirement.
A backup checklist
Use this list for any Odoo hosting, ours or someone else's:
- Backups include the filestore, not just the database
- Daily backups, with weekly and monthly ones kept for months
- A backup is taken automatically before every production update
- Backups are restored on a schedule, and failures are reported to you
- An encrypted copy is kept in a second location
- You can restore into a copy without touching production
- You can download a standard Odoo backup at any time
The details of how Odoo Cloud handles backups are on the features page, and every plan on the pricing page includes them. If you are comparing providers in the Gulf, Odoo hosting in the UAE: what to look for covers the other questions to ask.