In order to backup your database in PostgreSQL, use the following command:
pg_dump name_of_database > name_of_database.sql
In order to restore your database in PostgreSQL, use the following command:
psql name_of_database < name_of database.sql
Published by Muhammad Asfour
Estimated reading time: 1 min
In order to backup your database in PostgreSQL, use the following command:
pg_dump name_of_database > name_of_database.sql
In order to restore your database in PostgreSQL, use the following command:
psql name_of_database < name_of database.sql