2

I'm trying to restore a backup dumped from a postgres 8.3 server in a server with postgres 8.4 with this command:

pg_restore --host host --port 5432 --username username --dbname my_db /route/to/backup/b.backup --ignore-version --format=c

But I got this error:

pg_restore: [custom archiver] could not read from input file: end of file

I have done a restore with another Postgres 8.3 server and it worked just fine. My box is a Linux Mint Julia.

Anyone else with this same problem? Any idea?

migrated from stackoverflow.com Jan 14 '12 at 6:12

This question came from our site for professional and enthusiast programmers.

1

PostgreSQL uses various formats for backups. What's the format of yours?

pg_restore is only needed for backups using one of the archive file formats. The default format of backups produced with pg_dump is an SQL script that you can restore via psql:

psql dbname < /path/to/backup

Start by reading the chapter "Backup and Restore" in the manual.

Your Answer

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