I produced this backup:

pg_dump -v -Fc -Z5 -f thebackup.dmp.gz thedb

I can't open the dump with gzip, 7zip... I could recover the same files in the past without using -Fc parameter. Is it possible that using -Fc and -Z5 might have corrupted the compressed file?

  • Helpful article here.
    – Vérace
    Jul 22, 2015 at 18:34

1 Answer 1


Just use pg_restore:

pg_restore is a utility for restoring a PostgreSQL database from an archive created by pg_dump in one of the non-plain-text formats

Using -Z5 -Fc on pg_dump does not transform the backup into a gzip format. It adjusts the compression level, but the structure of the file is still the specific custom archive format that non-database commands like gzip or 7zip don't know.

  • I used just plain -Z5 without the -Fc parameter in the past and I could recover backups in the past opening them with gzip. But this one slipped away. Thanks
    – JPA
    Jul 23, 2015 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.