In general, we tend to back up the DB with the pgAdmin client. The following is a sh script used to save the database (under linux) in two formats:
SQL file: for a possible resume of data on any version of PostgreSQL.
Dump file: for a higher version than the current version.
#!/bin/sh...