Question: how to backup database in postgresql?
Answer: How to Back Up a PostgreSQL Database Using pg_dump. PostgreSQL includes a utility called "pg_dump" that can be used to dump database information into a file for backup purposes. The command must be run by a user with privileges to read all of the database information, so it is run as the superuser most of the time.