postgresql load dump code example
Example 1: load a dump in postgres 12
# To reload the dump in the database newdb.
pg_restore -d newdb mydumpfile
# To reload the dump in a created db.
psql -Umyuser mydatabase < mydumpfile
Example 2: postgres make sql dump
pg_dump -U username dbname > dbexport.pgsql
Example 3: how to take database dump in postgresql
pg_dump dbname > outfile