odoo12 database backup no owner?

Multi tool use
Multi tool use












-1















I can't backup odoo 12 database, i use postgres 10 and docker containers.error:



Database backup error: Postgres subprocess ('/usr/bin/pg_dump', '--no-owner', '--file=/tmp/tmpgoyjsd3i/dump.sql', 'odoo') error 1









share|improve this question





























    -1















    I can't backup odoo 12 database, i use postgres 10 and docker containers.error:



    Database backup error: Postgres subprocess ('/usr/bin/pg_dump', '--no-owner', '--file=/tmp/tmpgoyjsd3i/dump.sql', 'odoo') error 1









    share|improve this question



























      -1












      -1








      -1


      1






      I can't backup odoo 12 database, i use postgres 10 and docker containers.error:



      Database backup error: Postgres subprocess ('/usr/bin/pg_dump', '--no-owner', '--file=/tmp/tmpgoyjsd3i/dump.sql', 'odoo') error 1









      share|improve this question
















      I can't backup odoo 12 database, i use postgres 10 and docker containers.error:



      Database backup error: Postgres subprocess ('/usr/bin/pg_dump', '--no-owner', '--file=/tmp/tmpgoyjsd3i/dump.sql', 'odoo') error 1






      postgresql docker odoo






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 1 at 10:10









      Veikko

      1,0651816




      1,0651816










      asked Dec 31 '18 at 17:04









      ahmed aliahmed ali

      93




      93
























          1 Answer
          1






          active

          oldest

          votes


















          1














          This error occurs if you have a different version of Postgresql client (the version on Odoo server) and server (the version on your database server). If you are using the Odoo "official" Docker image or image based on that, e.g. veivaa/odoo image, it is based on debian:stretch version and it has Postgresql version 9.6 as default client. With this setup you will have a mismatch: client v9.6 connecting to server v10. It will result in the error you are getting.



          To solve this you have to install same version on client and server. You can either downgrade your Postgres server to 9.6, or upgrade Postgres client in your Odoo Docker container to 10. You can test this by doing the client upgrade manually. docker exec -ti -u 0 yourodoocontainername bash to the Odoo container and executing these commands inside the Odoo container:



          apt-get update
          echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > /etc/apt/sources.list.d/pgdg.list
          yes Y | apt-get install wget
          yes Y | apt-get install gnupg
          wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
          apt-get update
          yes Y | apt-get install postgresql-client-10


          You need to have root permissions in the container to run these. After this install you can exit from exec and restart your container with docker restart yourodoocontainername. Make sure you have persistent storage used for Odoo data so that you don't lose your filestore. After these steps you are able to do backups and restores with Odoo web interface.



          You can check your Postgresql client version with psql --version command. The expected result with version 9.6 is psql (PostgreSQL) 9.6.10 and with version 10 psql (PostgreSQL) 10.6 (Debian 10.6-1.pgdg90+1).



          The exec method is good for testing but not good for permanent use because it involves manual steps. You should build your Docker images with the right version by modifying your Dockerfile.






          share|improve this answer


























          • i have this error after last command : root@4de61dbd92d0:/# yes Y | apt-get install postgresql-client-10 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package postgresql-client-10 root@4de61dbd92d0:/#

            – ahmed ali
            Jan 3 at 18:42













          • I can successfully update postgresql with this script on both odoo:12.0 and veivaa/odoo:12.0-20190101. I updated the script in answer slightly to prevent apt-get without "yes Y" from stopping the script if you copy all the rows via clipboard. The old version worked but required commands separately.

            – Veikko
            Jan 3 at 20:31











          • What docker host system are you using (windows, mac, linux)? I remember having similar problems with dns name resolution when using Docker for Windows. Now I tested on mac and linux.

            – Veikko
            Jan 3 at 20:34











          • i'm using system linux: ubuntu 18.04 LTS

            – ahmed ali
            Jan 4 at 8:42













          • how can i upgrade container postgres from version 10 to 9.6 or from version 11 to version 9.6 using docker exec in container postgres ?

            – ahmed ali
            Jan 4 at 8:44













          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53989761%2fodoo12-database-backup-no-owner%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          This error occurs if you have a different version of Postgresql client (the version on Odoo server) and server (the version on your database server). If you are using the Odoo "official" Docker image or image based on that, e.g. veivaa/odoo image, it is based on debian:stretch version and it has Postgresql version 9.6 as default client. With this setup you will have a mismatch: client v9.6 connecting to server v10. It will result in the error you are getting.



          To solve this you have to install same version on client and server. You can either downgrade your Postgres server to 9.6, or upgrade Postgres client in your Odoo Docker container to 10. You can test this by doing the client upgrade manually. docker exec -ti -u 0 yourodoocontainername bash to the Odoo container and executing these commands inside the Odoo container:



          apt-get update
          echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > /etc/apt/sources.list.d/pgdg.list
          yes Y | apt-get install wget
          yes Y | apt-get install gnupg
          wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
          apt-get update
          yes Y | apt-get install postgresql-client-10


          You need to have root permissions in the container to run these. After this install you can exit from exec and restart your container with docker restart yourodoocontainername. Make sure you have persistent storage used for Odoo data so that you don't lose your filestore. After these steps you are able to do backups and restores with Odoo web interface.



          You can check your Postgresql client version with psql --version command. The expected result with version 9.6 is psql (PostgreSQL) 9.6.10 and with version 10 psql (PostgreSQL) 10.6 (Debian 10.6-1.pgdg90+1).



          The exec method is good for testing but not good for permanent use because it involves manual steps. You should build your Docker images with the right version by modifying your Dockerfile.






          share|improve this answer


























          • i have this error after last command : root@4de61dbd92d0:/# yes Y | apt-get install postgresql-client-10 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package postgresql-client-10 root@4de61dbd92d0:/#

            – ahmed ali
            Jan 3 at 18:42













          • I can successfully update postgresql with this script on both odoo:12.0 and veivaa/odoo:12.0-20190101. I updated the script in answer slightly to prevent apt-get without "yes Y" from stopping the script if you copy all the rows via clipboard. The old version worked but required commands separately.

            – Veikko
            Jan 3 at 20:31











          • What docker host system are you using (windows, mac, linux)? I remember having similar problems with dns name resolution when using Docker for Windows. Now I tested on mac and linux.

            – Veikko
            Jan 3 at 20:34











          • i'm using system linux: ubuntu 18.04 LTS

            – ahmed ali
            Jan 4 at 8:42













          • how can i upgrade container postgres from version 10 to 9.6 or from version 11 to version 9.6 using docker exec in container postgres ?

            – ahmed ali
            Jan 4 at 8:44


















          1














          This error occurs if you have a different version of Postgresql client (the version on Odoo server) and server (the version on your database server). If you are using the Odoo "official" Docker image or image based on that, e.g. veivaa/odoo image, it is based on debian:stretch version and it has Postgresql version 9.6 as default client. With this setup you will have a mismatch: client v9.6 connecting to server v10. It will result in the error you are getting.



          To solve this you have to install same version on client and server. You can either downgrade your Postgres server to 9.6, or upgrade Postgres client in your Odoo Docker container to 10. You can test this by doing the client upgrade manually. docker exec -ti -u 0 yourodoocontainername bash to the Odoo container and executing these commands inside the Odoo container:



          apt-get update
          echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > /etc/apt/sources.list.d/pgdg.list
          yes Y | apt-get install wget
          yes Y | apt-get install gnupg
          wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
          apt-get update
          yes Y | apt-get install postgresql-client-10


          You need to have root permissions in the container to run these. After this install you can exit from exec and restart your container with docker restart yourodoocontainername. Make sure you have persistent storage used for Odoo data so that you don't lose your filestore. After these steps you are able to do backups and restores with Odoo web interface.



          You can check your Postgresql client version with psql --version command. The expected result with version 9.6 is psql (PostgreSQL) 9.6.10 and with version 10 psql (PostgreSQL) 10.6 (Debian 10.6-1.pgdg90+1).



          The exec method is good for testing but not good for permanent use because it involves manual steps. You should build your Docker images with the right version by modifying your Dockerfile.






          share|improve this answer


























          • i have this error after last command : root@4de61dbd92d0:/# yes Y | apt-get install postgresql-client-10 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package postgresql-client-10 root@4de61dbd92d0:/#

            – ahmed ali
            Jan 3 at 18:42













          • I can successfully update postgresql with this script on both odoo:12.0 and veivaa/odoo:12.0-20190101. I updated the script in answer slightly to prevent apt-get without "yes Y" from stopping the script if you copy all the rows via clipboard. The old version worked but required commands separately.

            – Veikko
            Jan 3 at 20:31











          • What docker host system are you using (windows, mac, linux)? I remember having similar problems with dns name resolution when using Docker for Windows. Now I tested on mac and linux.

            – Veikko
            Jan 3 at 20:34











          • i'm using system linux: ubuntu 18.04 LTS

            – ahmed ali
            Jan 4 at 8:42













          • how can i upgrade container postgres from version 10 to 9.6 or from version 11 to version 9.6 using docker exec in container postgres ?

            – ahmed ali
            Jan 4 at 8:44
















          1












          1








          1







          This error occurs if you have a different version of Postgresql client (the version on Odoo server) and server (the version on your database server). If you are using the Odoo "official" Docker image or image based on that, e.g. veivaa/odoo image, it is based on debian:stretch version and it has Postgresql version 9.6 as default client. With this setup you will have a mismatch: client v9.6 connecting to server v10. It will result in the error you are getting.



          To solve this you have to install same version on client and server. You can either downgrade your Postgres server to 9.6, or upgrade Postgres client in your Odoo Docker container to 10. You can test this by doing the client upgrade manually. docker exec -ti -u 0 yourodoocontainername bash to the Odoo container and executing these commands inside the Odoo container:



          apt-get update
          echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > /etc/apt/sources.list.d/pgdg.list
          yes Y | apt-get install wget
          yes Y | apt-get install gnupg
          wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
          apt-get update
          yes Y | apt-get install postgresql-client-10


          You need to have root permissions in the container to run these. After this install you can exit from exec and restart your container with docker restart yourodoocontainername. Make sure you have persistent storage used for Odoo data so that you don't lose your filestore. After these steps you are able to do backups and restores with Odoo web interface.



          You can check your Postgresql client version with psql --version command. The expected result with version 9.6 is psql (PostgreSQL) 9.6.10 and with version 10 psql (PostgreSQL) 10.6 (Debian 10.6-1.pgdg90+1).



          The exec method is good for testing but not good for permanent use because it involves manual steps. You should build your Docker images with the right version by modifying your Dockerfile.






          share|improve this answer















          This error occurs if you have a different version of Postgresql client (the version on Odoo server) and server (the version on your database server). If you are using the Odoo "official" Docker image or image based on that, e.g. veivaa/odoo image, it is based on debian:stretch version and it has Postgresql version 9.6 as default client. With this setup you will have a mismatch: client v9.6 connecting to server v10. It will result in the error you are getting.



          To solve this you have to install same version on client and server. You can either downgrade your Postgres server to 9.6, or upgrade Postgres client in your Odoo Docker container to 10. You can test this by doing the client upgrade manually. docker exec -ti -u 0 yourodoocontainername bash to the Odoo container and executing these commands inside the Odoo container:



          apt-get update
          echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > /etc/apt/sources.list.d/pgdg.list
          yes Y | apt-get install wget
          yes Y | apt-get install gnupg
          wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
          apt-get update
          yes Y | apt-get install postgresql-client-10


          You need to have root permissions in the container to run these. After this install you can exit from exec and restart your container with docker restart yourodoocontainername. Make sure you have persistent storage used for Odoo data so that you don't lose your filestore. After these steps you are able to do backups and restores with Odoo web interface.



          You can check your Postgresql client version with psql --version command. The expected result with version 9.6 is psql (PostgreSQL) 9.6.10 and with version 10 psql (PostgreSQL) 10.6 (Debian 10.6-1.pgdg90+1).



          The exec method is good for testing but not good for permanent use because it involves manual steps. You should build your Docker images with the right version by modifying your Dockerfile.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 3 at 20:41

























          answered Jan 1 at 7:48









          VeikkoVeikko

          1,0651816




          1,0651816













          • i have this error after last command : root@4de61dbd92d0:/# yes Y | apt-get install postgresql-client-10 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package postgresql-client-10 root@4de61dbd92d0:/#

            – ahmed ali
            Jan 3 at 18:42













          • I can successfully update postgresql with this script on both odoo:12.0 and veivaa/odoo:12.0-20190101. I updated the script in answer slightly to prevent apt-get without "yes Y" from stopping the script if you copy all the rows via clipboard. The old version worked but required commands separately.

            – Veikko
            Jan 3 at 20:31











          • What docker host system are you using (windows, mac, linux)? I remember having similar problems with dns name resolution when using Docker for Windows. Now I tested on mac and linux.

            – Veikko
            Jan 3 at 20:34











          • i'm using system linux: ubuntu 18.04 LTS

            – ahmed ali
            Jan 4 at 8:42













          • how can i upgrade container postgres from version 10 to 9.6 or from version 11 to version 9.6 using docker exec in container postgres ?

            – ahmed ali
            Jan 4 at 8:44





















          • i have this error after last command : root@4de61dbd92d0:/# yes Y | apt-get install postgresql-client-10 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package postgresql-client-10 root@4de61dbd92d0:/#

            – ahmed ali
            Jan 3 at 18:42













          • I can successfully update postgresql with this script on both odoo:12.0 and veivaa/odoo:12.0-20190101. I updated the script in answer slightly to prevent apt-get without "yes Y" from stopping the script if you copy all the rows via clipboard. The old version worked but required commands separately.

            – Veikko
            Jan 3 at 20:31











          • What docker host system are you using (windows, mac, linux)? I remember having similar problems with dns name resolution when using Docker for Windows. Now I tested on mac and linux.

            – Veikko
            Jan 3 at 20:34











          • i'm using system linux: ubuntu 18.04 LTS

            – ahmed ali
            Jan 4 at 8:42













          • how can i upgrade container postgres from version 10 to 9.6 or from version 11 to version 9.6 using docker exec in container postgres ?

            – ahmed ali
            Jan 4 at 8:44



















          i have this error after last command : root@4de61dbd92d0:/# yes Y | apt-get install postgresql-client-10 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package postgresql-client-10 root@4de61dbd92d0:/#

          – ahmed ali
          Jan 3 at 18:42







          i have this error after last command : root@4de61dbd92d0:/# yes Y | apt-get install postgresql-client-10 Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package postgresql-client-10 root@4de61dbd92d0:/#

          – ahmed ali
          Jan 3 at 18:42















          I can successfully update postgresql with this script on both odoo:12.0 and veivaa/odoo:12.0-20190101. I updated the script in answer slightly to prevent apt-get without "yes Y" from stopping the script if you copy all the rows via clipboard. The old version worked but required commands separately.

          – Veikko
          Jan 3 at 20:31





          I can successfully update postgresql with this script on both odoo:12.0 and veivaa/odoo:12.0-20190101. I updated the script in answer slightly to prevent apt-get without "yes Y" from stopping the script if you copy all the rows via clipboard. The old version worked but required commands separately.

          – Veikko
          Jan 3 at 20:31













          What docker host system are you using (windows, mac, linux)? I remember having similar problems with dns name resolution when using Docker for Windows. Now I tested on mac and linux.

          – Veikko
          Jan 3 at 20:34





          What docker host system are you using (windows, mac, linux)? I remember having similar problems with dns name resolution when using Docker for Windows. Now I tested on mac and linux.

          – Veikko
          Jan 3 at 20:34













          i'm using system linux: ubuntu 18.04 LTS

          – ahmed ali
          Jan 4 at 8:42







          i'm using system linux: ubuntu 18.04 LTS

          – ahmed ali
          Jan 4 at 8:42















          how can i upgrade container postgres from version 10 to 9.6 or from version 11 to version 9.6 using docker exec in container postgres ?

          – ahmed ali
          Jan 4 at 8:44







          how can i upgrade container postgres from version 10 to 9.6 or from version 11 to version 9.6 using docker exec in container postgres ?

          – ahmed ali
          Jan 4 at 8:44






















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53989761%2fodoo12-database-backup-no-owner%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          t7,I,VVLQeST4zC4p7UIcnl,0XhjaZHh
          mgrfF6N S5csNlRYmU7Ouzsy isHU7yuP VArkm4 TsOmLSKAJxQ4nJ

          Popular posts from this blog

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas