Take the 2-minute tour ×
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. It's 100% free, no registration required.

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?

share|improve this question
add comment

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

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

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

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