What does an Odoo backup contain?
An Odoo database has two parts, and a backup that misses either one cannot be fully restored:
- The PostgreSQL database: every record, from contacts and invoices to configuration and users.
- The filestore: attachments stored as files on disk, such as PDFs, images, imported documents and email attachments.
Odoo’s backup offers two formats:
| Format | Contains | Use it for |
|---|---|---|
| zip (includes filestore) | dump.sql, the filestore/ folder and a manifest.json | Full backups and moving a database to another server |
| pg_dump custom format | The database only | Large databases where the filestore is backed up separately |
How do you back up Odoo from the database manager?
- Open the database managerGo to https://your-odoo-domain/web/database/manager. If it is not shown, the server has list_db = False and you need the command-line method.
- Click Backup next to the databaseChoose the database you want to copy.
- Enter the master passwordThis is admin_passwd from the Odoo configuration file, not a user password.
- Choose the zip formatzip (includes filestore) keeps attachments with the database. pg_dump custom format contains the database only.
- Download and store it off the serverSave the file somewhere other than the Odoo server, such as Google Drive or object storage.
Many production servers hide the manager with list_db = False, as Odoo recommends. That is good practice; use the command line instead.
How do you back up Odoo from the command line?
Option 1: call Odoo’s backup route
This produces the same zip as the manager and works even when the manager page is hidden:
curl -X POST \
-F "master_pwd=YOUR_MASTER_PASSWORD" \
-F "name=YOUR_DATABASE" \
-F "backup_format=zip" \
-o odoo-$(date +%F).zip \
https://your-odoo-domain/web/database/backupOption 2: pg_dump plus the filestore
On the server itself, back up the two parts separately:
pg_dump -Fc -f odoo-$(date +%F).dump YOUR_DATABASE
tar -czf filestore-$(date +%F).tar.gz -C /path/to/data_dir/filestore YOUR_DATABASEKeep the master password out of shell history and scripts that others can read, for example in a root-only file.
Where is the Odoo filestore?
The filestore is in <data_dir>/filestore/<database name>. To find data_dir:
- Look for
data_dirin the Odoo configuration file (often/etc/odoo/odoo.conf). - If it is not set, Odoo uses its default data folder for the user it runs as; on Linux that is usually
~/.local/share/Odoo. - The official Docker image uses
/var/lib/odoo, so the filestore is in/var/lib/odoo/filestore. Mount that path as a volume. - On Odoo.sh the filestore is managed for you and included in its backups.
How do you back up Odoo automatically?
| Method | Good for | Watch out for |
|---|---|---|
| Cron job running the command above | Self-hosted servers with a sysadmin | Copying the file off the server, deleting old files, alerting on failure |
| Backup module inside Odoo | Teams that want schedules and history in Odoo | Check it supports your version and hosting; Odoo Online cannot install modules |
| Hosting provider snapshots | Fast whole-server recovery | Often kept with the same provider; not a separate copy |
With Google Drive Storage Sync, Odoo runs its standard zip backup daily, weekly or monthly and uploads it to a Backups folder in Google Drive or a Shared Drive, recording each run in Odoo. The setup is in back up Odoo to Google Drive automatically.
How do backups work on Odoo.sh?
- The production database is backed up daily, filestore included.
- Odoo keeps 7 daily, 4 weekly and 3 monthly backups.
- You can take a manual backup from the Backups tab (up to 5 a day, kept for 3 days), for example before merging an upgrade.
- Backups can be downloaded from the Backups tab of the production branch.
These copies stay with Odoo. For an independent copy, download one regularly or schedule an upload to your own storage with a module committed to your repository.
How do you back up Odoo Online?
Odoo backs up Odoo Online databases itself. To keep your own copy, sign in at odoo.com/my/databases as the database administrator, open the database, choose Manage and then Download Backup. If the button is disabled the database is too large for that screen and Odoo Support has to provide the file. Odoo Online cannot install backup modules, so automatic off-site copies are not possible from inside the database.
How do you restore an Odoo backup?
- Open
/web/database/managerand choose Restore Database. - Enter the master password, select the zip file and give the new database a name.
- Say whether the database was moved or copied. Choose copied if the original still runs, so Odoo gives the copy its own identity and the two do not clash.
From the command line the same route accepts the file:
curl -X POST \
-F "master_pwd=YOUR_MASTER_PASSWORD" \
-F "name=restored_db" \
-F "copy=true" \
-F "[email protected]" \
https://your-odoo-domain/web/database/restoreA restored copy contains live settings: scheduled actions, outgoing mail servers and payment providers. Disable them before anyone uses a test copy, so it does not email customers or charge cards.
What makes an Odoo backup strategy reliable?
- Three copies, two places, one off-site. The live database, a local backup and one stored with a different provider.
- Backups before changes. Take one before every upgrade, module installation or large import.
- Retention you decide. Delete old files on a schedule; nothing removes them for you in most tools.
- Access control. A backup is the whole company’s data; keep it in a restricted folder.
- A restore test every quarter. Restore into a separate database and open a few invoices and attachments.
Sources
- Odoo 19: system configuration (on-premise) — master password, list_db, filestore
- Odoo.sh: branches → Backups — backup schedule and retention
- Odoo Online database management — Download Backup
Frequently asked questions
How often should I back up Odoo?
At least daily for a production database, plus a manual backup before every upgrade, module installation or data import. Keep several generations, for example 7 daily, 4 weekly and 3 monthly, which is also the pattern Odoo.sh uses.
Does an Odoo backup include attachments?
Only the zip format does. Attachments live in the filestore on disk, not in PostgreSQL, so a pg_dump-format backup or a plain pg_dump leaves them out. Choose “zip (includes filestore)” or back up the filestore folder separately.
Why is my Odoo backup so large?
Usually attachments: invoices, scanned documents, product images and email files in the filestore. Moving attachments to external storage such as Google Drive makes the database and its backups smaller and faster to create.
Can I back up Odoo without the master password?
Not through the database manager or its /web/database/backup route; both require it. A server administrator can still run pg_dump and copy the filestore directly on the server.
Can I back up Odoo to Google Drive automatically?
Yes, with a module that runs the standard backup on a schedule and uploads it, such as Google Drive Storage Sync, which supports daily, weekly or monthly backups to a Drive or Shared Drive folder. It works on self-hosted Odoo and Odoo.sh, not on Odoo Online.
Is it safe to keep Odoo backups in Google Drive?
A backup contains all your business data and customer records, so treat it like the database: store it in a restricted folder or Shared Drive with named members, enable two-step verification on the Google account, and delete old backups you no longer need.
Continue in this topic
Automate off-site backups this week
Google Drive Storage Sync schedules Odoo’s standard backup to Google Drive and records every run in Odoo. A setup call is included.
Get Google Drive Storage Sync — €390 →