Unable to restore database backup on Postgresql-10.0, getting “pg_restore: [archiver] unsupported version...












1















I am using postgresql-9.4 (port 5432) and postgresql-10.0 (port 5433) on my Linux machine (RHEL 7.4). Postgresql-9.4 was installed using yum repository and Postgresql-10.0 was installed using source in different partitions.



I have taken a backup of db (dtbase.backup) on Postgresql-9.4 using it's pg_dump and trying to restore this on Postgresql-10.0 using it's pg_restore.



While doing this, I am getting below error:



pg_restore: [archiver] unsupported version (1.13) in file header


I have checked different forums but unable to find the solution. Any help would be highly appreciated.










share|improve this question

























  • Pretty sure that error is telling you that the pg_restore packaged with the postgres 10 install you have doesn't support the dumpfile from the 9.4 version of pg_dump. Did you add any flags to the pg_dump? What flags?

    – cunninghamp3
    May 3 '18 at 11:47













  • pg_dump -i -p 5432 -U postgres -F c -b -v -f

    – erTugRul
    May 3 '18 at 11:49











  • But earlier I have restored the same way. Everything went fine.

    – erTugRul
    May 3 '18 at 11:50











  • May be a duplicate of stackoverflow question: stackoverflow.com/questions/49064209/…

    – cunninghamp3
    May 3 '18 at 12:05
















1















I am using postgresql-9.4 (port 5432) and postgresql-10.0 (port 5433) on my Linux machine (RHEL 7.4). Postgresql-9.4 was installed using yum repository and Postgresql-10.0 was installed using source in different partitions.



I have taken a backup of db (dtbase.backup) on Postgresql-9.4 using it's pg_dump and trying to restore this on Postgresql-10.0 using it's pg_restore.



While doing this, I am getting below error:



pg_restore: [archiver] unsupported version (1.13) in file header


I have checked different forums but unable to find the solution. Any help would be highly appreciated.










share|improve this question

























  • Pretty sure that error is telling you that the pg_restore packaged with the postgres 10 install you have doesn't support the dumpfile from the 9.4 version of pg_dump. Did you add any flags to the pg_dump? What flags?

    – cunninghamp3
    May 3 '18 at 11:47













  • pg_dump -i -p 5432 -U postgres -F c -b -v -f

    – erTugRul
    May 3 '18 at 11:49











  • But earlier I have restored the same way. Everything went fine.

    – erTugRul
    May 3 '18 at 11:50











  • May be a duplicate of stackoverflow question: stackoverflow.com/questions/49064209/…

    – cunninghamp3
    May 3 '18 at 12:05














1












1








1








I am using postgresql-9.4 (port 5432) and postgresql-10.0 (port 5433) on my Linux machine (RHEL 7.4). Postgresql-9.4 was installed using yum repository and Postgresql-10.0 was installed using source in different partitions.



I have taken a backup of db (dtbase.backup) on Postgresql-9.4 using it's pg_dump and trying to restore this on Postgresql-10.0 using it's pg_restore.



While doing this, I am getting below error:



pg_restore: [archiver] unsupported version (1.13) in file header


I have checked different forums but unable to find the solution. Any help would be highly appreciated.










share|improve this question
















I am using postgresql-9.4 (port 5432) and postgresql-10.0 (port 5433) on my Linux machine (RHEL 7.4). Postgresql-9.4 was installed using yum repository and Postgresql-10.0 was installed using source in different partitions.



I have taken a backup of db (dtbase.backup) on Postgresql-9.4 using it's pg_dump and trying to restore this on Postgresql-10.0 using it's pg_restore.



While doing this, I am getting below error:



pg_restore: [archiver] unsupported version (1.13) in file header


I have checked different forums but unable to find the solution. Any help would be highly appreciated.







linux postgresql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 19 mins ago







erTugRul

















asked May 3 '18 at 11:35









erTugRulerTugRul

24511




24511













  • Pretty sure that error is telling you that the pg_restore packaged with the postgres 10 install you have doesn't support the dumpfile from the 9.4 version of pg_dump. Did you add any flags to the pg_dump? What flags?

    – cunninghamp3
    May 3 '18 at 11:47













  • pg_dump -i -p 5432 -U postgres -F c -b -v -f

    – erTugRul
    May 3 '18 at 11:49











  • But earlier I have restored the same way. Everything went fine.

    – erTugRul
    May 3 '18 at 11:50











  • May be a duplicate of stackoverflow question: stackoverflow.com/questions/49064209/…

    – cunninghamp3
    May 3 '18 at 12:05



















  • Pretty sure that error is telling you that the pg_restore packaged with the postgres 10 install you have doesn't support the dumpfile from the 9.4 version of pg_dump. Did you add any flags to the pg_dump? What flags?

    – cunninghamp3
    May 3 '18 at 11:47













  • pg_dump -i -p 5432 -U postgres -F c -b -v -f

    – erTugRul
    May 3 '18 at 11:49











  • But earlier I have restored the same way. Everything went fine.

    – erTugRul
    May 3 '18 at 11:50











  • May be a duplicate of stackoverflow question: stackoverflow.com/questions/49064209/…

    – cunninghamp3
    May 3 '18 at 12:05

















Pretty sure that error is telling you that the pg_restore packaged with the postgres 10 install you have doesn't support the dumpfile from the 9.4 version of pg_dump. Did you add any flags to the pg_dump? What flags?

– cunninghamp3
May 3 '18 at 11:47







Pretty sure that error is telling you that the pg_restore packaged with the postgres 10 install you have doesn't support the dumpfile from the 9.4 version of pg_dump. Did you add any flags to the pg_dump? What flags?

– cunninghamp3
May 3 '18 at 11:47















pg_dump -i -p 5432 -U postgres -F c -b -v -f

– erTugRul
May 3 '18 at 11:49





pg_dump -i -p 5432 -U postgres -F c -b -v -f

– erTugRul
May 3 '18 at 11:49













But earlier I have restored the same way. Everything went fine.

– erTugRul
May 3 '18 at 11:50





But earlier I have restored the same way. Everything went fine.

– erTugRul
May 3 '18 at 11:50













May be a duplicate of stackoverflow question: stackoverflow.com/questions/49064209/…

– cunninghamp3
May 3 '18 at 12:05





May be a duplicate of stackoverflow question: stackoverflow.com/questions/49064209/…

– cunninghamp3
May 3 '18 at 12:05










2 Answers
2






active

oldest

votes


















1














Your 9.4 installation likely updated to 9.4.17 or greater, introducing a patch that makes the dumps that you make incompatible with postgresql version 10 prior to 10.3 per this stack overflow answer and the postgres announcement it links to.



From the announcement:




One security vulnerability is addressed in this release:

* CVE-2018-1058: Uncontrolled search path element in pg_dump and other client applications




This change breaks compatibility between versions that previously had compatible pg_dump/pg_restore workflows unless both versions have been updated to include the CVE patch.



You may want to consider upgrading your version 10 install to be installed from yum as well. I don't have experience with version 10 yet, but most likely postgres has continued to version the directories that the installation goes into, so you should be able to have both 9.4 and 10.3 installed from yum (and get security patches much more easily than rebuilding from source!).






share|improve this answer

































    0














    I have solved it without upgrading. I took backup again using pg_dump of 10.0 instead of 9.4 and pg_restore worked this time.






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      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: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      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%2funix.stackexchange.com%2fquestions%2f441527%2funable-to-restore-database-backup-on-postgresql-10-0-getting-pg-restore-arch%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      Your 9.4 installation likely updated to 9.4.17 or greater, introducing a patch that makes the dumps that you make incompatible with postgresql version 10 prior to 10.3 per this stack overflow answer and the postgres announcement it links to.



      From the announcement:




      One security vulnerability is addressed in this release:

      * CVE-2018-1058: Uncontrolled search path element in pg_dump and other client applications




      This change breaks compatibility between versions that previously had compatible pg_dump/pg_restore workflows unless both versions have been updated to include the CVE patch.



      You may want to consider upgrading your version 10 install to be installed from yum as well. I don't have experience with version 10 yet, but most likely postgres has continued to version the directories that the installation goes into, so you should be able to have both 9.4 and 10.3 installed from yum (and get security patches much more easily than rebuilding from source!).






      share|improve this answer






























        1














        Your 9.4 installation likely updated to 9.4.17 or greater, introducing a patch that makes the dumps that you make incompatible with postgresql version 10 prior to 10.3 per this stack overflow answer and the postgres announcement it links to.



        From the announcement:




        One security vulnerability is addressed in this release:

        * CVE-2018-1058: Uncontrolled search path element in pg_dump and other client applications




        This change breaks compatibility between versions that previously had compatible pg_dump/pg_restore workflows unless both versions have been updated to include the CVE patch.



        You may want to consider upgrading your version 10 install to be installed from yum as well. I don't have experience with version 10 yet, but most likely postgres has continued to version the directories that the installation goes into, so you should be able to have both 9.4 and 10.3 installed from yum (and get security patches much more easily than rebuilding from source!).






        share|improve this answer




























          1












          1








          1







          Your 9.4 installation likely updated to 9.4.17 or greater, introducing a patch that makes the dumps that you make incompatible with postgresql version 10 prior to 10.3 per this stack overflow answer and the postgres announcement it links to.



          From the announcement:




          One security vulnerability is addressed in this release:

          * CVE-2018-1058: Uncontrolled search path element in pg_dump and other client applications




          This change breaks compatibility between versions that previously had compatible pg_dump/pg_restore workflows unless both versions have been updated to include the CVE patch.



          You may want to consider upgrading your version 10 install to be installed from yum as well. I don't have experience with version 10 yet, but most likely postgres has continued to version the directories that the installation goes into, so you should be able to have both 9.4 and 10.3 installed from yum (and get security patches much more easily than rebuilding from source!).






          share|improve this answer















          Your 9.4 installation likely updated to 9.4.17 or greater, introducing a patch that makes the dumps that you make incompatible with postgresql version 10 prior to 10.3 per this stack overflow answer and the postgres announcement it links to.



          From the announcement:




          One security vulnerability is addressed in this release:

          * CVE-2018-1058: Uncontrolled search path element in pg_dump and other client applications




          This change breaks compatibility between versions that previously had compatible pg_dump/pg_restore workflows unless both versions have been updated to include the CVE patch.



          You may want to consider upgrading your version 10 install to be installed from yum as well. I don't have experience with version 10 yet, but most likely postgres has continued to version the directories that the installation goes into, so you should be able to have both 9.4 and 10.3 installed from yum (and get security patches much more easily than rebuilding from source!).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 3 '18 at 12:16

























          answered May 3 '18 at 12:11









          cunninghamp3cunninghamp3

          493215




          493215

























              0














              I have solved it without upgrading. I took backup again using pg_dump of 10.0 instead of 9.4 and pg_restore worked this time.






              share|improve this answer




























                0














                I have solved it without upgrading. I took backup again using pg_dump of 10.0 instead of 9.4 and pg_restore worked this time.






                share|improve this answer


























                  0












                  0








                  0







                  I have solved it without upgrading. I took backup again using pg_dump of 10.0 instead of 9.4 and pg_restore worked this time.






                  share|improve this answer













                  I have solved it without upgrading. I took backup again using pg_dump of 10.0 instead of 9.4 and pg_restore worked this time.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jun 7 '18 at 4:39









                  erTugRulerTugRul

                  24511




                  24511






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • 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%2funix.stackexchange.com%2fquestions%2f441527%2funable-to-restore-database-backup-on-postgresql-10-0-getting-pg-restore-arch%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







                      Popular posts from this blog

                      Accessing regular linux commands in Huawei's Dopra Linux

                      Can't connect RFCOMM socket: Host is down

                      Kernel panic - not syncing: Fatal Exception in Interrupt