If Odoo.sh is warning you that storage is running out, or your backups are getting slow, the first place to look isn’t the tables or the records — it’s the attachments. In the case below, most of the system’s size was PDF files.
The case: 80 GB at a real-estate company
A Saudi real-estate company running Odoo 17 Enterprise on Odoo.sh. By July 2026 production had reached 80 GB and was growing every month. When we analysed the storage we found:
- About 17,272 scanned invoices attached to records, totalling roughly 78 GB.
- A single 5-page invoice came out at around 90 MB.
- Nobody was misusing the system: the archiving clerk was doing the job right, but the scanner settings were at maximum resolution, full colour, no compression.
And it isn’t only production: every backup carries the full 80 GB. With about 6 backups, the real extra footprint was close to 400 GB.
Why attachments?
Odoo stores attachments in the filestore next to the database, and every file uploaded to an invoice, a contract or a chatter message stays there. A scanned PDF is really a set of large images inside a PDF wrapper, so its size depends entirely on scan resolution, colour and compression.
| Scanner setting | Approx. size per A4 page |
|---|---|
| Very high resolution, colour, no compression (this case) | up to 18 MB |
| 300 DPI colour, compressed | 0.5 – 2 MB |
| 200 DPI greyscale, compressed | 100 – 300 KB |
Figures are approximate and vary by scanner and document.
The fix: smart compression, not deletion
Deleting is not an option — these are accounting documents that must be kept. What we built is a tool inside Odoo that does the following:
- Automatic nightly compression: picks up new PDF attachments every night and compresses them with Ghostscript at a setting suited to reading and printing.
- Retroactive batch processing: works through older files in batches so the server isn’t loaded during business hours.
- Audit log: size before and after and the saving for every file, so you know exactly what was gained.
- Settings screen: controls the process from inside Odoo, no developer needed.
Results on staging
Before touching production we ran a full rehearsal on a staging copy:
| Metric | Before | After |
|---|---|---|
| 4,722 PDF files | 68 GB | 5.3 GB |
| Total system size | 80 GB | 22 GB |
That is a saving of over 92% on the files, with documents still clear for reading, printing and audit.
Prevent it in the first place: 5 tips
- Configure the scanner: 200–300 DPI, greyscale for ordinary documents, PDF compression on.
- Review the largest attachments monthly: a simple report of the top 50 files catches the problem early.
- Don’t duplicate files: upload once instead of attaching the same file to every record.
- Separate the historical archive: very old documents can move to external archive storage.
- Count the backup cost: every gigabyte in production is multiplied by the number of backups.
Want us to check your system?
If your Odoo is growing fast, we can analyse its storage as part of the free consultation and show you exactly where the space goes. Get in touch.