Restore database dump with tool pg_restore returns "pg_restore: error: input file does not appear to be a valid archive"

Viewed 905

Im working on windows 10 with powershell, pgAdmin 4v6 and the user has no admin permissions.

When I create the dump with a command similar to this one:

pg_dump -h localhost -p 8083 -d database-name -U user --password --clean -Fc --no-acl --no-owner > backup_name.dump

I try to make the restore with this command:

pg_restore -h localhost -p 5432 -U postgres -d posgres-v  backup_name.dump

Im gettign this message:

pg_restore: error: input file does not appear to be a valid archive
1 Answers

It seems that the error was the dump file, I created a new one and could restore it just fine.

Related