Skip to main content

Command Palette

Search for a command to run...

đź”’ How to Properly Backup Your Odoo Instance (Database + Filestore)

Updated
•2 min read
đź”’ How to Properly Backup Your Odoo Instance (Database + Filestore)

Keeping regular backups of your Odoo system is crucial to avoid data loss, corruption, or accidental deletion. An Odoo backup isn’t complete unless it includes both the PostgreSQL database and the filestore (where attachments and assets are stored).

In this article, we’ll walk you through what to back up, why it matters, and the standard practice to ensure your Odoo instance stays safe.


âś… What Needs to Be Backed Up?

Odoo stores its data in two key places:

  1. PostgreSQL Database (.sql backup)
    This contains all structured data — records, modules, user settings, products, transactions, etc.

  2. Filestore Directory
    This contains binary files like document attachments, images, reports, and uploaded files by users.

Both are essential. Restoring only the database without the filestore will result in missing files or broken attachments in your Odoo system.


đź’ˇ Why It Matters

Without proper backups:

  • You risk losing customer and financial data.

  • Broken links or missing images/files can impact user experience.

  • Recovery after a crash or migration becomes difficult or incomplete.


đź”§ How to Back Up Odoo (the Right Way)

Here’s the standard backup process:

1. Backup the PostgreSQL Database

You can use pg_dump to export your Odoo database into a .sql file:

pg_dump odoo_db_name > odoo_backup.sql

Replace odoo_db_name with your actual database name.

This file will contain the full database structure and data.

2. Backup the Filestore Directory

The filestore is typically found under:

~/.local/share/Odoo/filestore/<your-database-name>

Or, if using a custom config:

/var/lib/odoo/.local/share/Odoo/filestore/<your-database-name>

Simply copy this entire directory and store it alongside your SQL backup.


To stay organized, we suggest a backup folder like:

/backups/
    ├── 2025-04-20/
        ├── odoo_backup.sql
        └── filestore/

đź•’ How Often Should You Back Up?

  • Daily backups are ideal for active systems.

  • Use automation scripts or cron jobs to streamline this process.

  • Always test your backups by performing a restore on a staging server.


🚀 Final Thoughts

Backing up Odoo isn’t just about saving the database — it’s about capturing all your critical business data, including attachments and files. Make it a habit. Automate it if you can.

More from this blog

K

koderstory

8 posts

These are stories of our software development