Understanding Odoo's Filestore Structure: What’s Inside and Why It Matters
Learn where Odoo stores uploaded files, why the filestore uses hashed directories, and what to include in backups.
When exploring an Odoo installation, you may find a path like ~/.local/share/Odoo/filestore/yourdatabase/aa/ac/.... The two-letter folders can look random, and a database name that resembles a domain can be confusing. Here is what they mean.
What is the filestore?
Odoo keeps uploaded binary files—images, attachments, PDFs, and documents—outside the database in a dedicated filestore directory. This keeps large files separate from structured records. A typical location is:
~/.local/share/Odoo/filestore/
When Odoo runs as a service, the path may be under the service user's home, such as /var/lib/odoo/.local/share/Odoo/filestore/.
Why are there folders named aa, ac, or dc?
Odoo stores files using hashes and uses the beginning of a hash to place files into subdirectories. This avoids putting thousands of files in one directory and helps keep retrieval manageable as the filestore grows.
The directory immediately under filestore is the database name. A folder such as koderstory_com appears because the database was named that way; it is not derived automatically from the website domain.
What should you back up?
Keep the PostgreSQL database backup and the complete matching filestore directory together. Preserving only the database can leave attachment references without their files. Preserve every hashed subdirectory, and test restores in a staging environment so missing files are found before an emergency.
Originally published on Koderstory Devlog.
Managing Users and Groups on Linux: A Practical Guide
Practical Linux user and group commands for access control, team collaboration, and service isolation.
What Is a BoM and How Does It Affect Product Costs?
Understand how an Odoo Bill of Materials describes product components and helps calculate manufacturing costs.