How to restore compressed gzipped postgres database ?

on terminal:

sudo su

sudo -i -u postgres

zcat /home/vagrant/Code/dbname.gz | psql -d database

Advertisements