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

Channel: Linux
Abstract: I hope it will help you.mydb # cat backup-db.txt | psql mydb

If you are getting above error while restoring backup of database in postgresql. This error means you have taken backup in plain text format.

Error:

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

Solution:

To restore plain text backup using below command.

Backup filename: backup-db.txt
Database name: mydb

# cat backup-db.txt | psql mydb

I hope it will help you.

Ref From: tecadmin

Related articles