Comments (17)
You can directly bash into the postgres container and export the data out.
For instance,
$docker exec -i -t yourpostgrescontainerid bash
Then within Postgre bash, run pg_dumpall (or use pg_dump for selected db export).
root@yourpostgrescontainerid $pg_dumpall -U odoo | gzip -c > odoo_backup.out.gz
exit
Now copy out the backup file to your host
$docker cp yourpostgrescontainerid :/root/odoo_backup.out.gz yourbackupdirectory
After you would want to go back to Postgres bash and remove the backup file there.
from docker.
I had the same problem and it apears to be a version conflict between postgresql client in odoo and in postgresql server version.
If you get the version 9 of postgresql as described in the documentation, it will fetch you the version 9.5 but odoo image used version 9.4 which is not compatible.
you have to use version 9.4 of postgresql server image
(bad news is that your data created with 9.5 are not compatible with 9.4)
from docker.
Thx. Yes, I can backup using docker utils indeed. I also can backup when connecting to postgres docker instance through using database instance private address ...docker inspect db | grep "IPAddress" and connecting to port 5432 using pg_dump or pg_admin, but it seems that Odoo's own tool is not working. - So this is a bug report concerning faulty backup operation of Odoo when using this docker image.
from docker.
Not sure if my question relates to this bug.
What about backing up a DB from a hosted production odoo installation and restoring it into a local dockerized odoo?
Tried that with odoo 8 container, but it fails.
This is the error I get and immediately reverts to the main manager's page.
Any idea?
Appreciated.
from docker.
So packet loss is the root cause right? If the patch cords are loosing packets, then it is a no go for all the setup.
from docker.
i'm having the same issue, has anyone checked @aetna-softwares version conflict proposal?
from docker.
I tried to but I am always gettin the following error:
I am not sure if the error is related to our problem.
from docker.
OK... I have removed all images and start over again.. The import finished smoothly.
I am using odoo:8 and postgresql:9.4
One thing that does not work is the mapping of modules.
My images storage is '~/My-VMs/docker/'
In there I have '~/My-VMs/docker/maps/' for directories that will be mapped.
So I run
'docker run -v ~/My-Virtual-Machines/docker/maps/addons:/mnt/extra-addons -p 8069:8069 --name odoo --link db:db -t odoo:8'
But the modules are not accessible.
Then 'docker exec -it f76e52af0065 /bin/bash'
Then:
f76e52af0065:/$ ls -l /mnt/extra-addons/
ls: cannot open directory /mnt/extra-addons/: Permission denied
f76e52af0065:/$
Any ideas?
I used 'nsenter --target 5670 --mount --uts --net --ipc --pid' to change the ownership of /mnt/extra-addons in the image, but the results was the same.
So the solution regarding the images versions looks correct, but the mapping does not work for addons.
Open to any suggestions.
from docker.
AND IT WORKS
SElinux was the issue.
As of docker 1.7 there is a Z option following the mapping declaration, that automatically lables the hosts's to be mapped directory with the correct context for the container.
So.
To revise:
docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo --name db postgres:9.4
Observe the :9.4 (colon 9.4) at the end of the postgres image version.
docker run -v /full/path/to/hosts/dir:/mnt/extra-addons:Z -p 8069:8069 --name odoo --link db:db -t odoo:8
Observe the :Z (colon Z) at the end of the -v declaration.
In case you are using the image to experiment with you actual DBs backup, make sure that the host's path, has all the modules as in your production server.
I just restored into the docker image, my production DB running on a hosted server on the Internet.
Full functionality.
Regards,
Theo
from docker.
What is the recommended method for using the Odoo 9 Docker image with Postgres 9.5? The postgresql client included with the Odoo 9 image is for version 9.4 and doesn't support certain operations such as backup (e.g. pg_dump). How should we overcome this and bake it into a Dockerfile?
from docker.
@fpodoo Can you address my previous question?
from docker.
You need an manually updated odoo image, as it seems currently not covered by the odoo debian package, you could modify the apt-get install
section and include postgres-client-9.5
, yet iirc it's not yet on the official apt repos, so you also need to include those repos first...
from docker.
this might help: odoo/odoo#12275 (comment)
from docker.
Bottom-line: please use the 9.4 version of the postgres docker image with Odoo 9. We're updating the docker image documentation to make the version tag explicit, so you'd run it this way:
$ docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo --name db postgres:9.4
from docker.
@kanderson450 if you want to use PG 9.5 with the official Odoo 9 docker image you should simply add a layer on top of it to install the postgresql-client-9.5 package. You can get inspiration from the official postgres dockerfile, which is also based on debian:jessie, like the odoo one. Just install postgresql-client instead of the server.
from docker.
https://www.odoo.com/forum/help-1/question/backup-restore-fails-with-odoo-9-100788
from docker.
All you need to do is create your own image with the correct version of the client tools. For example, I am using PG 9.6 and solved it by simply adding this to my base image: https://github.com/idazco/odoo-docker-ez/blob/master/10/Dockerfile#L83
from docker.
Related Issues (20)
- Oddo don't work on Unraid HOT 8
- recent docker pull from odoo:16 cause AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK' HOT 2
- Odoo 15 Unraid update never worked HOT 2
- Apply docker compose HOT 4
- Update the release version of Odoo 17. HOT 2
- odoo:15,how to upgrade to new version HOT 4
- [17.0] lxml.html.clean module is now a separate project lxml_html_clean HOT 2
- Update Odoo release in the dockerfile to include commit 7e9a873 HOT 4
- Location of HOT 2
- Need link to docs, or info for docker image & SSL HOT 9
- Two critical Security Issues HOT 1
- Database Manager does not work HOT 1
- [Feature Request] Could it be possible to add fail2ban to the docker image? HOT 5
- Odoo with high availability on AWS HOT 1
- Error exec /entrypoint.sh: no such file or directory when running Odoo 17 Docker image HOT 5
- How to use odoo:17 image in devcontainer? HOT 4
- Problem creating new database with Odoo 16 with Docker and Enterprise Addons HOT 4
- Odoo HOT 1
- [17.0][ERROR] Issue when opening Dashboard App
- Odoo 16/15: Plans on upgrading to bookworm to fix Docker image vulnerabilities? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.