Odoo Help


Database backup - Attachments

Manuel Pérez
on 1/5/15, 10:45 AM 2,061 views


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?


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.

on 1/5/15, 1:42 PM

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

Manuel Pérez
on 1/5/15, 3:14 PM

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

on 1/5/15, 6:44 PM

@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

on 1/5/15, 7:09 PM

@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

on 1/6/15, 2:03 AM

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?

Manuel Pérez
on 1/6/15, 2:06 PM

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

on 1/7/15, 1:57 AM
On 1/7/15, 3:08 AM

If you didn't configure  data_dir in your config file, then all your attachments are stored in default location:
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

On 1/6/15, 3:19 PM

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.

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)


Asked: 1/5/15, 10:45 AM
Seen: 2061 times
Last updated: 3/16/15, 8:10 AM