Migration DB postgresql in windows to Red Hat(linux)
pg_dump will create a file with the queries that are needed to recreate the state of your database. The file will look like a transaction or write ahead log.

pg_dump databasename &gt; dumpfilename


pg_restore then will use this file to recreate your database.
It's also useful to migrate to a newer database version

you could also use

psql newdatabasename &lt; dumpfilename