Server Fault is a question and answer site for system and network administrators. 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

pg_restore is taking too long to finish. I already performed the following

  • service postgresql initdb
  • /etc/init.d/postgresql start
  • Modified /var/lib/pgsql/data/pg_hba.conf to use

    local all all trust

    host all all ident sameuser

    host all all ::1/128 ident sameuser

  • /etc/init.d/postgresql restart

What could be the problem?

share|improve this question
up vote 0 down vote accepted

It turns out out I was missing a parameter. What I was doing was

pg_restore -U postgres -d /path/to/backup/file/file.backup

instead of

pg_restore -U postgres -d databasename /path/to/backup/file/file.backup

I'm still not sure if the first one is not correct. I swear I could remember using that same syntax before.

share|improve this answer
The first one is incorrect. It will attempt to read a backup file from STDIN, not from your file. – Magnus Hagander Sep 30 '09 at 8:35
Cool. Thanks, Magnus. Could you explain more about it? – Randell Sep 30 '09 at 14:05
The backup is sitting in the shell, waiting for input from the shell. As such, it never starts, because no input is received. – Avery Payne Oct 9 '09 at 14:25

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.