Odoo Help

0

Odoo 10 docker export and import data

By
Gregory Petit
on 2/7/17, 6:47 AM 2,018 views

Hi, I'm currently running odoo 10 in a docker container. I would like to export the data from the one docker and import it in the other one.

On the source system I do the following:

- export the database: pg_dumpall -U postgres | gzip -c > odoo_backup.out.gz

- copy over the directory /var/lib/odoo


On the target I do:

- import the DB dump: psql -U postgres < odoo_backup.out

- copy the odoo directory back to /var/lib/


All works fine, except that the pictures are not visible. When I edit the website and I want to pick a previously uploaded picture, all are showing errors except for 2.

So I'm wondering now, are the pictures stored in another location as well?


Kind regards,

Gregory

1

Axel Mendoza

--Axel Mendoza--
13145
| 7 8 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza
On 3/4/17, 9:14 PM

Hi Gregory

Yes, not only the pictures, all the attachments generated and documents are located in the Odoo filestore per database. Normally it's located in the Odoo running user path

~/.local/share/Odoo/filestore

But you could have a different place for that setted in the config file as data_dir of your Odoo like the Odoo Docker Image does

data_dir = /var/lib/odoo

So if you copy the content of /var/lib/odoo maybe you are having some permissions issues. Set the owner for the odoo user again for the copied files just to be sure that Odoo could readit, also check the logs to see what it's the error



0
Jos De Graeve
On 9/14/17, 3:28 AM

Hello Gregory,


I' d recommend to use the odoo database backup feature.  That way you can create a backup containing both the database dump as the attachments file store.


Regards,

0
Dheeraj Balodia
On 9/20/17, 6:45 AM

For backup, you can go to this link http://localhost:8069/web/database/manager.

  • You can create a backup from there.
  • You can restore your pre existing backup also.

Important- Before that just set your master password for your Database to avoid consequences in future.

If you want to change particular models or fields while logged in. You can do it by export/importaction provided by Odoo. After exporting data from local you can import it on your server for that you have to validate it. 

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.

Register

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

1 follower(s)

Stats

Asked: 2/7/17, 6:47 AM
Seen: 2018 times
Last updated: 9/27/17, 11:42 AM