This question has been flagged
2 Replies
6518 Views

Hi,

I've realized that, after backing up a database and restoring it in another instance, the attachments uploaded are no longer available. The Document addon was installed in the first database, and so in the second one. The reference to the attachments is kept, but when trying to download any of them the system returns a message stating the document is not available.

Have you ever found such an issue?

Regards.

Avatar
Discard

Have you perhaps configured your Odoo to save all files in a filestore? (which means that the actual file is not saved in the database but on your system). Otherwise you should be able to still access all files.. If you have a small dump (less then 10MB or so) you most likely have a filestore.

Author

Hi Yenthe, Where can this configuration option be found? Thanks in advance.

if you had configured odoo for files to be stored in the filesystem of your OS and not in the database itself (and which I have seen several people plead for) there must be some links or reference in the database pointing to those files. I guess this could be a problem in case you take your database and restore it on another system then it came from. Still there must be a solution to 'reconnect' this somehow

@Manuel: if you are not aware that you have set up attachments to be stored in your file system instead of the database I think it is pretty unlikely that this is the case. As far as I heard this is nothing you can accidentally do by pressing the wrong button somewhere. So you should have actively initiated that

@Manuel this depends from Odoo version to version. In V8 you should have a parameter "data_dir" or ir_attachment.location under settings > parameters. In V7 there should be a parameter named ir_attachment.location. You can read more about these settings here: https://www.odoo.com/nl_NL/forum/help-1/question/where-are-document-attachments-stored-529

Author

Hi Yenthe - I installed odoo v8 with demo data, along with the Document module, but there's no ir_attachment.location parameter under Settings->Technical->Parameters-System parameters, is this something that has to be created manually? that makes me wonder whether there's any list of all the system parameters that can be configured, are you aware of more of these parameters?

Hi Manuel I don't think there is any overview of all the System parameters. Couldn't find one with Google anyways. Some of the parameters are web.base.url, web.base.url.freeze, report.url, data_dir, ir_attachment.location

Best Answer

If you didn't configure  data_dir in your config file, then all your attachments are stored in default location:
~/.local/share/Odoo/db_name....
so you need to bacup/restore that folder too... they are not backed up with db because files are not stored in db
(in order to keep db file small and easy to backup/restore)

hope it helps

Avatar
Discard
Best Answer

Hi, my V8 deployment on Ubuntu Linux 14.04 stores the attachments in the local home directory of the user which runs the odoo server, in the subdirectory .local/share/Odoo/filestore. I hope this helps.

Avatar
Discard