PostgreSQL databases are dumped with the pg_dump command. A simple shell script to do the backup job could be as follows:
#!/bin/sh pg_dump -h-U -f -Z 9
Passwords cannot be transfered to the pg_dump as a parameter, you must create a file .pgpass in the home directory of the calling user with the following content:
: : : :