postgres backup code example
Example 1: postgresql restore from dump
psql -U postgres -h localhost -p 5432 -f data_dump.sql
Example 2: postgres make sql dump
pg_dump -U username dbname > dbexport.pgsql
psql -U postgres -h localhost -p 5432 -f data_dump.sql
pg_dump -U username dbname > dbexport.pgsql