Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

what are your pros and cons about storing attachments in the filesystem instead of the database?

By
gunnar
on 5/28/14, 5:33 AM 1,660 views

here https://www.odoo.com/forum/Help-1/question/Where-are-document-Attachments-stored-529 is a detailed discussion going on about how to have attached files to be stored in the servers file system and not in the database (as it is being done by default).

Can anyone explain what is the advantage? I assume there might be pros and cons for either method and I hope we can gather some arguments here.

1
Nigel
On 5/28/14, 11:03 AM

Access, performance, and reliability. They are the tradeoffs to each type.

If you store the files in the database, you have to scale up the database to handle ever increasing data, which also increases the server load. If the database crashes it can be a long nightmare to reconstruct/repair due to the data. Load balancing and sychronizing becomes difficult when the data gets large. BUt you have full control over file security, access rights, the files will always be available, development for access to the files is easier, and file access is faster as they can be indexed.

If files are stored in the filesystem (local, drive, NAS, SAS, etc), you may have dropped links/connections/or concurrent access issues and security rights are also more difficult to enforce. Database recovery and maintianance problems become much easier to deal with, and expanding storage space and redundancy for your files is fairly straight forward. It is also easier to load balance and decenteralize your database to different locations.

There are many more nuances to the pros and cons, in the end it relates to how much data will be handled. If you are handling 1/2 million documents+, you probably should not be storing them in the same database as Odoo/OpenERP, they should live in thier own dedicated database with the proper database type, or they should live in a dedicated fileserver.

 

thanks Nigel. Great post.

gunnar
on 5/29/14, 4:05 AM
0

Thierry Godin

--Thierry Godin--
1516
| 8 7 8
Collegien, France
--Thierry Godin--

..

Thierry Godin
On 5/28/14, 7:12 AM

Hello,

I do store attachments for a module I developped (Drop Box like) on file system to keep a light DB. I just do not forget to backup storage folder with the DB.

is your module available?

Bista Solutions US, Ray Carnes
on 5/29/14, 6:40 PM

Module is not available yet. I have to rewrite it, and I have not enough time. Could be done this summer

Thierry Godin
on 5/30/14, 3:07 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 5/28/14, 5:33 AM
Seen: 1660 times
Last updated: 3/16/15, 8:10 AM