I have used pg_dump on one machine and copied result file to another, where I tried to restore it. I believe schema is the same. However, I get:
pg_restore: [archiver] input file does not appear to be a valid archive
I have done following operations:
pg_dump -a -f db.txt dbname
and:
pg_restore -a -d dbname db.txt
What might be wrong?
Best Answer
You are dumping in plain SQL format which was designed to feed to
psql
. This is not recognized bypg_restore
.Should do the trick