pg_dump is the functionality provided by Postgres to take the backup of database
Usage:
If the intent is create database while restoring
pg_dump -f <fileName> -U <user name> --create <databaseName>
Usage:
If the intent is create database while restoring
pg_dump -f <fileName> -U <user name> --create <databaseName>