Search code examples
databasepostgresqlpg-restore

pg_restore works with zip file?


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!


Solution

  • .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....