$ pg_dumpall -f backup.sql
This works behind the scenes by making multiple connections to the server once for each database and executing pg_dump on it.
Sometimes, you might be tempted to set this up as a cron job, so you want to see the date the backup was taken as part of the filename:
$ post...