Recently, I was involved a SDN App which is using PostgreSQL database as backend. After finally developing the app and doing upgrades, we stumbled upon the migration scenario where data export of the existing database was needed. Hence I started researching about, how to export data (basically only insert statements) in PostgreSQL.
Though it seemed very every easy to do this from pgAdmin GUI tool, we needed to do it from console due to firewalls and it took us some time to figure out the right command to do it.
PostgreSQL Version: 9.2
Login as postgres admin user
su - postgres
Run the export command below:
.\pg_dump --username "postgres" --format plain --section data --inserts --file "<backup file name>" "<db to backup>"
Hope it helps!