Search code examples
postgresqlpgadmin-4

How to restore postgresql database from .txt.gz file?


I'm using pgAdmin 4 and i want to restore my old database backup file which is in txt.gz format.

I've tried using pgAdmin to restore but getting error message like:

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


Solution

  • please try with below command

    gunzip -c filename.gz | psql dbname