Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.0] set filestore as default #2811

Closed
ferdiga opened this issue Sep 30, 2014 · 9 comments
Closed

[8.0] set filestore as default #2811

ferdiga opened this issue Sep 30, 2014 · 9 comments
Assignees

Comments

@ferdiga
Copy link

ferdiga commented Sep 30, 2014

Oliver Dony suggest to set filestore on slide 31 of
http://www.slideshare.net/openobject/performance2014-35689113

Please do so for newly created databases.
filestore

@LeartS
Copy link
Contributor

LeartS commented Oct 2, 2014

Isn't it default already? I tried multiple 8 installations and reports and other static/binary data is never saved to the database but always in a directory.

@odony
Copy link
Contributor

odony commented Oct 2, 2014

Yes it is already the case in Odoo 8, see here (notice the default value for the parameter is file, i.e. use filestore)

@odony odony closed this as completed Oct 2, 2014
@ferdiga
Copy link
Author

ferdiga commented Oct 5, 2014

sorry Oliver, but I can not reproduce what you mentioned in your answer:

Odoo git from today (Oct 5th 2014)
git config --get remote.origin.url
https://github.com/odoo/odoo.git

~/git/odoo$ git status
On branch 8.0
Your branch is up-to-date with 'origin/8.0'

create fresh odoo instance - no modules yet:
try to create attachment for user – no button for attachment

install module sales management
try to create attachment for partner (customer) – no button for attachment

install Document Management System
create attachment for partner (customer) – button now available

attachments stored internally – no directory filestore (or file)

@nhomar
Copy link
Collaborator

nhomar commented Oct 5, 2014

Dear @ferdiga

I passed by your position already.

Let me explain you how it changed.

Run Odoo V8 with -s parameter and read the config file.

We have a New config parameter called "data_dir": no more ir.config_parameter per db.

This parameter is the one used for 100% of attachments but something changed for better.

Now : Odoo 8.0 will cache 100 of CSS and attachments there, without even ask "BUT" if you make a backup using the backup approach of odoo automagically attachments are converted to data in DB and saved toghether, ignoring what is generated by website part.

In other hand: When you recover this backup it is automagically dumped in the correct folder without any issue.

I hope it helps ....

regards

@ferdiga
Copy link
Author

ferdiga commented Oct 5, 2014

thanks Nhomar, I missed the new location.

@michaelkarrer81
Copy link

+1 thank you very much! I missed that one too!

@odony
Copy link
Contributor

odony commented Oct 6, 2014

For the record, some clarifications:

  • In Odoo 8 the system parameter (ir_attachment.location) is still supported, but it is only used to switch between file-storage and db-storage, not for selecting the location (for security reasons, see below). It defaults to file-storage, as explained previously.
  • The filestore location can only be controlled via the configuration file (data_dir), not via the database, for security purposes. Otherwise external users might trick the system into reading arbitrary files. It defaults to a platform-specific location inside the home directory of the user executing the service.
  • The 'Attachments' menu only appears when the Document module is installed (this was already the case in 7.0). If you do not install it, attachments are only available as part of the message history under most documents.
  • The backup format has been changed to be a Zip archive containing both a database dump and a copy of the filestore. During a restore it will be extracted and copied back into the filesystem. This does not mean that taking backups will move your filestore into the database, it only means that the filestore is backed up and restored along with the database contents.

@michaelkarrer81
Copy link

@odony Thank you very much for you clarifications! Makes things a lot clearer for me!

@lapagept
Copy link

Hey guy! Thanks for your texts.
Other questions here.
When we go in Setting->Database Structure->Attachments :

capture d ecran 2015-06-30 a 14 23 18

If we prefer to store our attachments in a external filestore, should they appear there too?

Document module is well installed. Odoo 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants