Using psql command to restore:
psql -U username -d database_name -h host_address < script.sql
Using pgrestore command to restore:
```
pgrestore -h localhost -p 5432 -U postgres -d olddb -v
or
pgrestore -U username -d dbname -1 filename.dump
```