pg_restore works with zip file?

Artem Fedotov picture Artem Fedotov · Oct 13, 2017 · Viewed 7.9k times · Source

Just trying to restore tutorial database from resource: http://www.postgresqltutorial.com/load-postgresql-sample-database/

so, after this code

pg_restore -U postgres -d dvdrental /Users/fedotarte/Downloads/dvdrental.zip

i got current message:

pg_restore: [archiver] input file does not appear to be a valid archive

what should i do to restore database successfully?

Thank you in advance!

Answer

Artem Fedotov picture Artem Fedotov · Oct 13, 2017

.tar is also triggered as a invalid input file, after unzip dvdrental.zip i typed next command(pointed the folder):

pg_restore -U postgres -d dvdrental /Users/fedotarte/Downloads/dvdrental

And now it works correctly!

P.S.

i duplicated this question: Postgres Tutorial: pg_restore: [archiver] input file does not appear to be a valid archive

Sorry about that....