how to restore pg_dump file code example
Example 1: postgresql restore from dump
psql -U postgres -h localhost -p 5432 -f data_dump.sql
Example 2: restore postgres database from sql file
psql -d database_name -f backup.sql
Example 3: pg_restore, pg_dump
pg_restore --verbose --clean --no-acl --no-owner --host=localhost --dbname=db_name --username=username latest.dump