pg_dumpall |gzip bsdtar Unrecognized archive format

Hi,
Trying to run pg_dumpall and pipe to gzip and then mail the resulting gz file. However, the mail system uses bsdtar to open and it can't.

Tried the following: /usr/local/bin/pg_dumpall | gzip -c > latest-pgdumpall.sql.gz

Code:
bsdtar -tzvf latest-pgdumpall.sql.gz
bsdtar: Error opening archive: Unrecognized archive format

Please point out what I might be doing wrong.

Thanks.
 
Back
Top