I'm trying to restore a PostgreSQL backup that was created on version 11.7 on a fresh install of version 14.1.

When running the pg_restore command, it hangs on the terminal indefinitely with zero output even with verbose logging enabled. Trying to connect as a non-existing user doesn't even give an error. Connecting via psql works fine and I can execute commands without problems.

The following command was used to create the dump: pg_dump -Fc -f file.pgdump -d mydb

I have tried restoring the dump from another host to the problematic host (one that had no problems restoring it to it's own local instance of PostgreSQL 14.1) which resulted in the same problem. This is the command I am using: pg_restore -f file.pgdump -U user -j 6 --verbose

The fact that I am getting zero feedback from the pg_restore command is making this rather difficult to diagnose. What could be the issue?

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

This is the command I am using: pg_restore -f file.pgdump -U user -j 6 --verbose

This is assumes that -f filename is the dump file, but that's not the case. It introduces an output file.

From the manpage:

-f filename --file=filename Specify output file for generated script, or for the listing when used with -l. Use - for stdout.

The synopsis is: pg_restore [connection-option...] [option...] [filename]

It expects the path of the dump file at the end of the command, not as an option.

Nothing happens with your invocation because it's waiting for the dump contents in the standard input, since no file is specified at the end of the command.

Your Answer

flwd is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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