If the dump was made with pg_dumpall, it can typically be played with :
gzip -dc filename.bak.gz | psql -U postgres
Note that the default security settings set in pg_hba.conf require this to be run by the postgresql administrative user (use sudo).
If it's the dump of a single database, it might have been made with pg_dump with the custom format (-Fc) in which case it has to be fed to pg_restore. To be sure, the file must be gunzip'ed and the start of the contents inspected.
If the dump was made with
pg_dumpall
, it can typically be played with :Note that the default security settings set in
pg_hba.conf
require this to be run by thepostgresql
administrative user (usesudo
).If it's the dump of a single database, it might have been made with
pg_dump
with the custom format (-Fc
) in which case it has to be fed topg_restore
. To be sure, the file must be gunzip'ed and the start of the contents inspected.