Command
psql -U username dbname < backup.sqlExplanation
Restores a PostgreSQL database from a SQL dump file.
Examples
Restore database from file
psql -U postgres mydb < mydb_backup.sqlpsql -U username dbname < backup.sqlRestores a PostgreSQL database from a SQL dump file.
Restore database from file
psql -U postgres mydb < mydb_backup.sql