How to Properly Backup Your Odoo Instance (Database + Filestore)
Back up both the PostgreSQL database and Odoo filestore to preserve business records and uploaded files.
Regular backups help protect an Odoo system from data loss, corruption, and accidental deletion. A complete backup needs both the PostgreSQL database and the filestore where Odoo keeps attachments and assets.
What needs to be backed up?
The PostgreSQL database contains structured information such as records, module data, settings, products, and transactions. The filestore contains binary files, including document attachments, images, reports, and files uploaded by users. Restoring only the database can leave broken links or missing attachments.
Back up the database
Use pg_dump to export the database. Replace the example name with the database you actually use:
pg_dump odoo_db_name > odoo_backup.sql
Back up the filestore
The filestore is commonly found at ~/.local/share/Odoo/filestore/<database-name> or, for a service installation, at /var/lib/odoo/.local/share/Odoo/filestore/<database-name>. Copy the entire database-specific directory and store it alongside the SQL backup.
A dated folder makes the matching pieces clear:
/backups/
└── 2025-04-20/
├── odoo_backup.sql
└── filestore/
For active systems, daily backups are a useful starting point. Automate the process where possible, and periodically restore a backup on a staging server. A backup is only dependable when both parts are present and the restore has been tested.
Originally published on Koderstory Devlog.
How to Install Odoo 18 Community Edition on Ubuntu Server
A practical walkthrough for preparing Ubuntu, installing Odoo 18 Community dependencies, configuring PostgreSQL, and starting the server.
Launch Your Odoo MVP in Weeks with MoSCoW Prioritization
A practical way to launch an Odoo ERP MVP quickly by focusing the team on the features that matter most.