How do I restore a plain text postgres .backup fileHow save psql `ERROR` output to the same file as the DDL...

How could a scammer know the apps on my phone / iTunes account?

Is having access to past exams cheating and, if yes, could it be proven just by a good grade?

How to make healing in an exploration game interesting

How could a female member of a species produce eggs unto death?

Do I need life insurance if I can cover my own funeral costs?

Possible Leak In Concrete

How to deal with a cynical class?

Why do passenger jet manufacturers design their planes with stall prevention systems?

Sword in the Stone story where the sword was held in place by electromagnets

How to write cleanly even if my character uses expletive language?

Why would a flight no longer considered airworthy be redirected like this?

Science-fiction short story where space navy wanted hospital ships and settlers had guns mounted everywhere

My adviser wants to be the first author

Why are the outputs of printf and std::cout different

How do I hide Chekhov's Gun?

Why must traveling waves have the same amplitude to form a standing wave?

Good allowance savings plan?

Old race car problem/puzzle

Bash: What does "masking return values" mean?

Does the statement `int val = (++i > ++j) ? ++i : ++j;` invoke undefined behavior?

Provisioning profile doesn't include the application-identifier and keychain-access-groups entitlements

Dot in front of file

Rules about breaking the rules. How do I do it well?

The use of "touch" and "touch on" in context



How do I restore a plain text postgres .backup file


How save psql `ERROR` output to the same file as the DDL commands?How to solve UTF8 invalid byte sequence copy errors on a restore, when the source database is encoded in UTF8?Error importing back a postgres db after dumpingimporting sql into postgresql databaseSetting password for 9.3 PostgreSQL serverDifferences between .dump and .sql in pg_dump PostgreSQLPostgreSQL dump and restoreHow save psql `ERROR` output to the same file as the DDL commands?Getting Failed (exit code: 1). when running restore DB from a .tar file in pgAdmin4 postgresql 10.5Export each row of a table into a separate text fileCannot restore postgres dump file













16















I exported a postgres db from pgAdmin in a plain format because I wanted to search the whole db text. I then tried to restore the database back but it gives an error saying that the archive file is not valid archive file. How do I restore the db back if it can be restored?










share|improve this question













migrated from stackoverflow.com Feb 21 '12 at 16:57


This question came from our site for professional and enthusiast programmers.























    16















    I exported a postgres db from pgAdmin in a plain format because I wanted to search the whole db text. I then tried to restore the database back but it gives an error saying that the archive file is not valid archive file. How do I restore the db back if it can be restored?










    share|improve this question













    migrated from stackoverflow.com Feb 21 '12 at 16:57


    This question came from our site for professional and enthusiast programmers.





















      16












      16








      16


      3






      I exported a postgres db from pgAdmin in a plain format because I wanted to search the whole db text. I then tried to restore the database back but it gives an error saying that the archive file is not valid archive file. How do I restore the db back if it can be restored?










      share|improve this question














      I exported a postgres db from pgAdmin in a plain format because I wanted to search the whole db text. I then tried to restore the database back but it gives an error saying that the archive file is not valid archive file. How do I restore the db back if it can be restored?







      postgresql pgadmin






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 21 '12 at 11:06









      yankitwizzyyankitwizzy

      191126




      191126




      migrated from stackoverflow.com Feb 21 '12 at 16:57


      This question came from our site for professional and enthusiast programmers.









      migrated from stackoverflow.com Feb 21 '12 at 16:57


      This question came from our site for professional and enthusiast programmers.
























          2 Answers
          2






          active

          oldest

          votes


















          17














          run:



          psql -U your_user_name your_db_name < your_dump_file





          share|improve this answer


























          • I am on windows 7. Can I do this on windows 7?

            – yankitwizzy
            Feb 21 '12 at 11:09











          • it should, if psql frontend is included in the postgresql package. Try to fire up a terminal, then cd to postgresql bin directory and try to run psql

            – guido
            Feb 21 '12 at 11:13











          • I tried it now. It didnt work. There is psql.bat file in the postgres bin directory. I am using postgres 8.3

            – yankitwizzy
            Feb 21 '12 at 11:17











          • what do you mean with 'it didnt work'? if there is psql.bat however, try with that, it should run psql. look here for help archives.postgresql.org/pgsql-admin/2006-12/msg00091.php

            – guido
            Feb 21 '12 at 11:22











          • Sorry I meant there is no psql.bat file in the bin directory

            – yankitwizzy
            Feb 21 '12 at 11:27



















          0














          HOW TO RESTORE NAME AS DEO.BACKUP EXE FILE IN MY PSQL





          share








          New contributor




          Raju Kharikap is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "182"
            };
            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%2fdba.stackexchange.com%2fquestions%2f13585%2fhow-do-i-restore-a-plain-text-postgres-backup-file%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









            17














            run:



            psql -U your_user_name your_db_name < your_dump_file





            share|improve this answer


























            • I am on windows 7. Can I do this on windows 7?

              – yankitwizzy
              Feb 21 '12 at 11:09











            • it should, if psql frontend is included in the postgresql package. Try to fire up a terminal, then cd to postgresql bin directory and try to run psql

              – guido
              Feb 21 '12 at 11:13











            • I tried it now. It didnt work. There is psql.bat file in the postgres bin directory. I am using postgres 8.3

              – yankitwizzy
              Feb 21 '12 at 11:17











            • what do you mean with 'it didnt work'? if there is psql.bat however, try with that, it should run psql. look here for help archives.postgresql.org/pgsql-admin/2006-12/msg00091.php

              – guido
              Feb 21 '12 at 11:22











            • Sorry I meant there is no psql.bat file in the bin directory

              – yankitwizzy
              Feb 21 '12 at 11:27
















            17














            run:



            psql -U your_user_name your_db_name < your_dump_file





            share|improve this answer


























            • I am on windows 7. Can I do this on windows 7?

              – yankitwizzy
              Feb 21 '12 at 11:09











            • it should, if psql frontend is included in the postgresql package. Try to fire up a terminal, then cd to postgresql bin directory and try to run psql

              – guido
              Feb 21 '12 at 11:13











            • I tried it now. It didnt work. There is psql.bat file in the postgres bin directory. I am using postgres 8.3

              – yankitwizzy
              Feb 21 '12 at 11:17











            • what do you mean with 'it didnt work'? if there is psql.bat however, try with that, it should run psql. look here for help archives.postgresql.org/pgsql-admin/2006-12/msg00091.php

              – guido
              Feb 21 '12 at 11:22











            • Sorry I meant there is no psql.bat file in the bin directory

              – yankitwizzy
              Feb 21 '12 at 11:27














            17












            17








            17







            run:



            psql -U your_user_name your_db_name < your_dump_file





            share|improve this answer















            run:



            psql -U your_user_name your_db_name < your_dump_file






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 8 '14 at 7:51









            Community

            1




            1










            answered Feb 21 '12 at 11:07









            guidoguido

            28626




            28626













            • I am on windows 7. Can I do this on windows 7?

              – yankitwizzy
              Feb 21 '12 at 11:09











            • it should, if psql frontend is included in the postgresql package. Try to fire up a terminal, then cd to postgresql bin directory and try to run psql

              – guido
              Feb 21 '12 at 11:13











            • I tried it now. It didnt work. There is psql.bat file in the postgres bin directory. I am using postgres 8.3

              – yankitwizzy
              Feb 21 '12 at 11:17











            • what do you mean with 'it didnt work'? if there is psql.bat however, try with that, it should run psql. look here for help archives.postgresql.org/pgsql-admin/2006-12/msg00091.php

              – guido
              Feb 21 '12 at 11:22











            • Sorry I meant there is no psql.bat file in the bin directory

              – yankitwizzy
              Feb 21 '12 at 11:27



















            • I am on windows 7. Can I do this on windows 7?

              – yankitwizzy
              Feb 21 '12 at 11:09











            • it should, if psql frontend is included in the postgresql package. Try to fire up a terminal, then cd to postgresql bin directory and try to run psql

              – guido
              Feb 21 '12 at 11:13











            • I tried it now. It didnt work. There is psql.bat file in the postgres bin directory. I am using postgres 8.3

              – yankitwizzy
              Feb 21 '12 at 11:17











            • what do you mean with 'it didnt work'? if there is psql.bat however, try with that, it should run psql. look here for help archives.postgresql.org/pgsql-admin/2006-12/msg00091.php

              – guido
              Feb 21 '12 at 11:22











            • Sorry I meant there is no psql.bat file in the bin directory

              – yankitwizzy
              Feb 21 '12 at 11:27

















            I am on windows 7. Can I do this on windows 7?

            – yankitwizzy
            Feb 21 '12 at 11:09





            I am on windows 7. Can I do this on windows 7?

            – yankitwizzy
            Feb 21 '12 at 11:09













            it should, if psql frontend is included in the postgresql package. Try to fire up a terminal, then cd to postgresql bin directory and try to run psql

            – guido
            Feb 21 '12 at 11:13





            it should, if psql frontend is included in the postgresql package. Try to fire up a terminal, then cd to postgresql bin directory and try to run psql

            – guido
            Feb 21 '12 at 11:13













            I tried it now. It didnt work. There is psql.bat file in the postgres bin directory. I am using postgres 8.3

            – yankitwizzy
            Feb 21 '12 at 11:17





            I tried it now. It didnt work. There is psql.bat file in the postgres bin directory. I am using postgres 8.3

            – yankitwizzy
            Feb 21 '12 at 11:17













            what do you mean with 'it didnt work'? if there is psql.bat however, try with that, it should run psql. look here for help archives.postgresql.org/pgsql-admin/2006-12/msg00091.php

            – guido
            Feb 21 '12 at 11:22





            what do you mean with 'it didnt work'? if there is psql.bat however, try with that, it should run psql. look here for help archives.postgresql.org/pgsql-admin/2006-12/msg00091.php

            – guido
            Feb 21 '12 at 11:22













            Sorry I meant there is no psql.bat file in the bin directory

            – yankitwizzy
            Feb 21 '12 at 11:27





            Sorry I meant there is no psql.bat file in the bin directory

            – yankitwizzy
            Feb 21 '12 at 11:27













            0














            HOW TO RESTORE NAME AS DEO.BACKUP EXE FILE IN MY PSQL





            share








            New contributor




            Raju Kharikap is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.

























              0














              HOW TO RESTORE NAME AS DEO.BACKUP EXE FILE IN MY PSQL





              share








              New contributor




              Raju Kharikap is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.























                0












                0








                0







                HOW TO RESTORE NAME AS DEO.BACKUP EXE FILE IN MY PSQL





                share








                New contributor




                Raju Kharikap is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.










                HOW TO RESTORE NAME AS DEO.BACKUP EXE FILE IN MY PSQL






                share








                New contributor




                Raju Kharikap is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.








                share


                share






                New contributor




                Raju Kharikap is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 8 mins ago









                Raju KharikapRaju Kharikap

                1




                1




                New contributor




                Raju Kharikap is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                Raju Kharikap is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                Raju Kharikap is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Database Administrators 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%2fdba.stackexchange.com%2fquestions%2f13585%2fhow-do-i-restore-a-plain-text-postgres-backup-file%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

                    Anexo:Material bélico de la Fuerza Aérea de Chile Índice Aeronaves Defensa...

                    Always On Availability groups resolving state after failover - Remote harden of transaction...

                    update json value to null Announcing the arrival of Valued Associate #679: Cesar Manara ...