🗂 Understanding Odoo's Filestore Structure: What’s Inside and Why It Matters

koderstorykoderstory
2 min read

When backing up or exploring your Odoo installation, you might come across a path like this:

~/.local/share/Odoo/filestore/yourdatabase/aa/ac/...

At first glance, it might look confusing — especially the random two-letter folders (aa, ac, dc). Why are they there? And why does it sometimes look like your domain is inside the folder path?

Let’s break it down.


🧠 What Is the Filestore in Odoo?

Odoo stores all uploaded binary files — such as images, attachments, PDFs, documents — outside of the database, inside a dedicated filestore directory. This helps keep the database fast and efficient.

The filestore is usually located at:

t~/.local/share/Odoo/filestore/

Or, if Odoo is running under a service:

/var/lib/odoo/.local/share/Odoo/filestore/

📛 Why Is My Domain in the Folder Name?

You might see a folder named something like:

filestore/koderstory_com/

This name is not based on your website domain — it’s based on your Odoo database name. If your database is named koderstory_com, that’s what will show up here.

So if you chose your domain as the database name, that’s why it appears. But it's not a technical requirement — just a naming choice.


📁 What’s with All These aa, ac, dc Directories?

Inside your filestore, Odoo organizes files into subdirectories like this:

filestore/yourdatabase/aa/
filestore/yourdatabase/ac/
filestore/yourdatabase/dc/

These folders are not random — they are hash-based directories. When a file is saved in Odoo, it's assigned a unique hash, and the first few characters of that hash are used to create a folder path.

Why Odoo Does This:

  • To avoid storing thousands of files in a single folder.

  • To improve file retrieval performance.

  • To follow best practices for scalable file systems (similar to how Git organizes objects).

This means the structure is intentional and optimized for speed and safety.


🛡️ What to Back Up

To fully back up your Odoo system, don’t just save the database — you must include:

  • ✅ A .sql file from your PostgreSQL database

  • ✅ The full filestore folder at:
    filestore/<your-database-name>/

Everything inside, including the hashed folders, must be preserved for a successful restore.


🧪 Pro Tip: Test Your Backups

Always verify your backup by restoring it in a staging environment. A missing filestore can lead to broken attachments, lost files, or PDF errors.


🚀 Final Thoughts

The filestore may look strange at first, but it’s a smart system built to handle large volumes of data. Now that you understand the structure, you can confidently manage, back up, and restore your Odoo instance the right way.

Interested in implementing an ERP system with Odoo? Let’s build it the right way.

0
Subscribe to my newsletter

Read articles from koderstory directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

koderstory
koderstory

Koderstory is a lean software company focused on building viable, straightforward products that empower small businesses to grow.