Issue
I have Postgres DB on machine with Windows OS, also I have virtual machine with Linux (Ubuntu). I need to move data from Windows to Linux. Thanks in advance!
Solution
you can use below query to restore a database from one server to another
pg_dump -C -h SourceServer -U SourceUser SourceDB | psql -h TargetHost -U TargetUser TargetDB
Password can be used from pgpass.conf
Answered By - YogeshR