-
Notifications
You must be signed in to change notification settings - Fork 23.1k
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
Unable to create DB backup within docker container #12275
Comments
@blaggacao I know you're pretty familiar with developing within docker... Any suggestions, sir? |
We are working in an alpine linux implementation at the moment, we don't use odoo's official images. I have had errors with pg_dump as it resides in the distribution's postgres packages, so the corresponding packages must be present. However as the official odoo image uses EDIT: For further debugging I can recommend: |
Since the Postgres client version to use is dependent of the Postgres server version, one of our developers created Python scripts that connect to a Postgres docker and use the Postgres client hosted inside.
Besides we have a specific postgresql 9.5 docker image (elicocorp/postgres:9.5) Example Script based on our image:
|
@elicoidal I was also wondering if @Petrievn is using a separate postgres, but as he mentions, he is using the official image, which if i remember correctly does no separation of concern and just packs the postgres into the dockerfile. I would agree, that this is not even satisfying for development, but that's probably something that should be tackled apart. EDIT: Just updated myself, those times are gone, that odoo packed postgres into the very same image. Then it's most probably a version mismatch indeed. |
There is also: |
@blaggacao whether the images are together or not is important. |
@elicoidal actually, I wa a bit out of date concerning the official image... 😄 |
@Petrievn If those replies helped, consider closing this. I consider it more a "user error", than a design bug. |
@Petrievn I doubt this will be open for much longer, as the GitHub issues section is reserved for bugs, but I want you to know that you're more than welcome to pick this up with us elsewhere: Mailing Lists: Help Forum: Respectfully, @elicoidal and @blaggacao - Thank you very much, gentlemen. @Yenthe666 Sir.. ;-) |
Hi @Petrievn, As stated by @blaggacao and @tesserB this is not really something related to the Github issues. I've kept this open in favor of the fact that you where talking about the official Odoo image for Docker. Since other people confirm this is not related to just this docker image I'm closing this one. @tesserB thanks a lot for helping us out with issues. 👍 Regards, |
ProblemThis most definitely isn't "User Error". The Odoo Docker image instructions are broken since they completely ignore this postgres version incompatbility. The instructions tell users to start up a postgres database:
Since this line omits the version tag, it defaults to latest which points to version 9.5 This version is incompatible with the Odoo Docker image since it points to the debian build which includes version 9.4. You may be fooled initially that things are okay since the Odoo server starts up. But when you need to backup the database, you're in for a rude awakening. There are a few different ways to mitigate this issue Solutions
RelatedGitHub issues about this problem have been opened on this repo and the Odoo Docker repo without resolution: 49: Database backup We can debate where this issue should live but make no mistake, this isn't User Error and needs to be addressed by Odoo officially. |
@kanderson450 Well, I'm not going to fault you for your persistence—"closed mouths don't get fed"—but have you thought to submit a PR implementing any of your proposed solutions? And what about blaggacao' response to you? "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..." I'm asking because if you want someone else to draft the changes to the doc, it would be helpful to know... In the meantime, I need to see a man about a taser... (Psst, @aab-odoo or @mart-e, come quick! 4th issue on this —the natives are getting restless...) |
@tesserB I could absolutely submit a PR and would have already but this is the first time I've seen any real response to this issue on any of the open/closed issues. It would be nice to have the Odoo guys on the same page before writing a PR that will never be merged. Do you work for Odoo or have write permissions to the repo? Let's all agree on the best approach to take. This is tangentially related to: 10357 Postgresql 9.5 supported? |
Hi there. Thank you for the replies. I am a layman in this field, hence On Mon, 06 Jun 2016, 22:21 kanderson450 notifications@github.com wrote:
Petrie |
@kanderson450 thanks a lot for the detailed answer, one of the best answers I've seen in a long time here. I've reopened this issue since this is indeed something that should be fixed by Odoo. |
The odoo docker image is based on debian:jessie, which only has postgresql-client-9.4, while the official postgres docker is 9.5. This causes a version mismatch and errors when using the postgres command-line tools, such as `pg_dump`. Fixes odoo/odoo#12275 Fixes odoo/docker#49 Fixes odoo/docker#54 Fixes odoo/docker#59
Upstream PR to update the docker doc and explicitly pin the postgres docker image to 9.4: docker-library/docs#595 Regarding the other proposed solutions:
|
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 |
Impacted versions:
9.0
Steps to reproduce:
Current behavior:
Gives error:
Expected behavior:
Must succeed
Video/Screenshot link (optional):
The text was updated successfully, but these errors were encountered: