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?
asked Feb 21, 2012 at 11:06
1 Answer 1
run:
psql -U your_user_name your_db_name < your_dump_file
-
I am on windows 7. Can I do this on windows 7?yankitwizzy– yankitwizzy2012年02月21日 11:09:17 +00:00Commented Feb 21, 2012 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 psqlguido– guido2012年02月21日 11:13:46 +00:00Commented Feb 21, 2012 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.3yankitwizzy– yankitwizzy2012年02月21日 11:17:36 +00:00Commented Feb 21, 2012 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.phpguido– guido2012年02月21日 11:22:37 +00:00Commented Feb 21, 2012 at 11:22
-
Sorry I meant there is no psql.bat file in the bin directoryyankitwizzy– yankitwizzy2012年02月21日 11:27:39 +00:00Commented Feb 21, 2012 at 11:27
lang-sql