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. Join them; it only takes a minute:

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

This will be probably extreme novice question but I want to restore a .backup dump file. I have tried the following command:

pg_restore -i -h localhost -p 5432 -U postgres -d old_db -v C:/blabla/bla.backup

First error I have encountered because the dump file is in text format so I should restore it using psql.

Then I have tried this command:

psql dbname < C:/blabla/bla.backup

But didn't accept the password of my windows user password

share|improve this question
Do you have a database user? One of the differences between the two commands is -U postgres – dezso May 21 '13 at 12:21
yes I have just one db user "postgres" but the second command does not accept the password of the windows user. It is in german but something like authentication for the user "mtuna" was not succesful – mctuna May 21 '13 at 12:26
psql dbname postgres < C:/blabla/bla.backup solved the problem thanks – mctuna May 21 '13 at 12:44

Your Answer


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

Browse other questions tagged or ask your own question.