Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Feb 21 '12 at 16:57

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

up vote 8 down vote accepted


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 – 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.