Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries ⟶
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    • Affiliate Program
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Documents
  3. S3 Offload: move the Odoo filestore to AWS S3, Cloudflare R2 and Backblaze B2 v 20.0
  4. Sales Conditions FAQ

S3 Offload: move the Odoo filestore to AWS S3, Cloudflare R2 and Backblaze B2

by Aerya IT Solutions https://aerya.net
Odoo

$ 53.69

v 20.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Versions 17.0 18.0 19.0 20.0
You bought this module and need support? Click here!
Versions 17.0 18.0 19.0 20.0
  • Description
  • Manifest
  • License
Aerya Odoo 17, 18, 19 and 20, Community and Enterprise · Developed in the European Union by Aerya IT Solutions

S3 Offload: move the Odoo filestore to AWS S3, Cloudflare R2 and Backblaze B2

Move the binaries of your attachments out of the Odoo filestore into a bucket of Amazon S3, Cloudflare R2, Backblaze B2, Wasabi, Garage or any S3-compatible service, without changing a link or an access right. A file leaves the filestore only after its copy in the bucket was verified, and you can move everything back.

Verified copy first: size, ETag, optional SHA-1 of a full download
Migration with a dry run, a progress bar, pause, and failed files you can retry
Move back to Odoo, verify the bucket, repair from the local copy
No boto3, no other module needed, Odoo 17 to 20

Runs on Odoo.sh and on-premise, not on Odoo Online (SaaS), where Odoo does not allow modules with Python code. Please buy the version that matches your database.

A migration halfway through

Screenshots of Odoo 17 Enterprise with the data of a fictitious company.

101 automated tests
on Odoo 20
Code checked with flake8 and pylint-odoo
no warnings

The problem

The filestore of an Odoo server grows with every attachment: invoices, scans, mail attachments, product images. After a few years it is hundreds of gigabytes on the disk of the server, it makes backups slow and it ties the company to one machine. Putting the files in an object storage bucket is the usual answer, but moving them is a job nobody wants to do twice: a file lost on the way is a lost invoice.

The migration must be safe: nothing leaves the filestore before its copy is checked, a failed file must wait and be retried, and the move must be reversible.

What the module does

It moves the binaries of Odoo attachments out of the filestore into any S3-compatible bucket: Amazon S3, Cloudflare R2, Backblaze B2, Wasabi, DigitalOcean Spaces, Hetzner, OVH, Scaleway, Garage or SeaweedFS. Odoo keeps the attachment record, the access rights and the links. Only the bytes move. A migration works through the existing files in the background with a progress bar, and new files can move by themselves a few minutes after they are saved. It needs only Odoo's mail, no Python package and no other Aerya module.

How it works, step by step

  • Create the bucket and a key. In your storage service create a bucket and an access key allowed to list, read, write and delete in it (s3:ListBucket, s3:GetObject, s3:PutObject, s3:DeleteObject, s3:AbortMultipartUpload).
  • Configure the bucket in Odoo. Open Object Storage > Buckets > New: bucket, endpoint (empty for Amazon), region and keys. Test Connection writes, reads and deletes a probe object.
  • Dry run. In Object Storage > Migrations > New choose the direction Move files to the bucket and press Dry Run: it counts the files and the megabytes.
  • Start. Press Start. A scheduled action works through the files in the background and a progress bar shows how far it got. Failed files wait with growing delays. Failed Files lists them with the reason and a retry button.
  • Move new files. Switch on Move New Files on the bucket. Files saved from now on that pass the filters (size from 100 KB by default, field images optional) move a few minutes after they are saved.
  • Move back, or verify. A migration can also move files back to Odoo, checking each file against its checksum first, or verify the bucket: missing or damaged objects are repaired from the local copy while it exists.

A worked example

A company has 180 GB of attachments in the filestore. The administrator creates a bucket, tests the connection and runs a dry run: 412,000 files. She starts the migration at the end of the day. Overnight the scheduled action copies each file, checks its size and its ETag against the MD5 of the file, and releases the local file to Odoo's filestore cleanup three days later, only if the copy in the bucket still checks out. Nineteen files fail because they were locked: they wait and are retried, and the list shows the reason. From then on, new files move by themselves, and the server's disk stops growing.

Safety rules

  • A file leaves the filestore only after its copy in the bucket was verified: size, the ETag against the MD5 of the file, and optionally a full download compared with the SHA-1 of the attachment. The local file must match the checksum of the attachment before it is sent.
  • The local file is not deleted at once. It is released to Odoo's own filestore cleanup after Keep Local Copy days (3 by default) and only if the bucket copy still checks out. If the bucket lost it, the file is uploaded again from the local copy.
  • A reading error is an error, never an empty file: while the bucket is unreachable a read raises, instead of returning nothing that could be saved back.
  • Bucket objects are deleted only when nothing uses them any more, after a delay (7 days by default). Shared content, with the same checksum, is stored once.
  • Uninstalling is refused while attachments are in a bucket: move them back first.
  • A copy of the database is neutralized: automatic move off, pending deletions dropped, secret keys blanked, running migrations paused.

Features

A migration with progress

A dry run first, then a progress bar, pause and resume, and failed files you can retry.

A migration halfway through

The bucket and its rules

Endpoint, region, keys, the size filter and the way files are served: Odoo reads the file and sends it (the default), or redirects to a signed link valid 5 minutes. Images always go through Odoo, which resizes them.

A bucket and the rules that move files

Files that could not move

Each failed file with the reason and a retry button.

Files that could not move, with the reason

The list of migrations

Every migration, in either direction, with its state.

The migrations

Cleanup with a delay

Objects wait for their delay before they are deleted from the bucket, so the bucket keeps a copy while you check.

Objects waiting for their delay

The files held by the bucket

Every attachment stored in a bucket.

The files held by the bucket

The log

What the module did, file by file.

The log

Settings and options

Bucket, endpoint, region, keysEndpoint empty for Amazon. Test Connection writes, reads and deletes a probe.
Move New FilesFiles saved later move a few minutes after they are saved.
Size filterFrom 100 KB by default. Field images are optional.
Keep Local CopyDays before the local file is released (3 by default).
Bucket cleanup delay7 days by default. Give the bucket versioning or a backup of its own.
ServingOdoo reads and sends the file, or redirects to a signed link valid 5 minutes.
Large filesAbove 64 MB, by multipart upload in 16 MB parts.

What it does not do

  • Attachments kept in the database (location db): the migration refuses and says how to switch.
  • The web asset bundles, URL attachments and the attachments of views are never moved.
  • Client-side encryption and SSE-C, bucket lifecycle and replication (create them in the service), and a CDN in front of the bucket.
  • Very large files are read whole into memory when served by Odoo or moved back. Add a bucket lifecycle rule that aborts incomplete multipart uploads after 7 days.
  • The tests ran against a self-hosted S3 server (Garage 2.1). They have not run against Backblaze B2 or Cloudflare R2.

Requirements

Odoo versions17, 18, 19 and 20
EditionsCommunity and Enterprise
Odoo appsDiscuss (mail)
Modules of oursNone. No Python package.
LanguagesEnglish, Spanish and Romanian

Questions

Can I go back to the filestore?

Yes. A migration moves the files back to Odoo, checking each one against its checksum first. The bucket copies stay or are cleaned up, as you choose.

What if the bucket is unreachable?

A read raises an error. It never returns an empty file.

Do I need CORS rules?

No.

Which services work?

Any service that speaks the S3 API: Amazon S3, Cloudflare R2, Backblaze B2, Wasabi, DigitalOcean Spaces, Hetzner, OVH, Scaleway, Garage, SeaweedFS.

Can two databases use the same bucket?

Not at the same prefix. Use {db} in the prefix.

Explore our other apps

More modules by Aerya IT Solutions for Odoo 20, built to work together.

S3 Connector

Mirror Odoo attachments to a bucket of AWS S3, Cloudflare R2, Backblaze B2

128 EUR · View on the store →

Cloud Storage Sync Base

Cloud storage sync engine for Odoo attachments, used with a connector (Nextcloud, ownCloud

89 EUR · View on the store →

Nextcloud Connector

Mirror Odoo attachments to Nextcloud, ownCloud or any WebDAV server (NAS, Apache, Synology

128 EUR · View on the store →

Cloud Backup to S3, Nextcloud and WebDAV

Backup to Nextcloud, backup to WebDAV or an S3 bucket

154 EUR · View on the store →

3PL Billing and Logistics Billing

Warehouse billing from the stock ledger: rate cards per client, storage by pallet, position

89 EUR · View on the store →

Questions or a custom quote?

Write to info@aerya.ro for questions about the module, its installation or custom development.

Aerya Aerya IT Solutions · Developed in the European Union · aerya.net
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 2208
Technical Name aerya_cloud_offload
LicenseOPL-1
Websitehttps://aerya.net
Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with