Please consider modification of PostgreSQL backup script to backup all clusters of PostgreSQL. My experience is that many servers are running multiple PostgreSQL instances. Maybe it would even make sense to detect all available databases (Firebird, MySQL, PostgreSQL, MSSQL, OpenLDAP) and backup all of them. If you are interested I can help you to create scripts for all these databases on Linux.
Something like the script below with some extras (like checking if the backup was successful) could do the job.
#!/bin/sh
tmp=/tmp/urbackup_databases
mkdir -p $tmp
chmod 777 $tmp
# Backup all PostgreSQL clusters to binary compressed dumps
if command -v pg_lsclusters>/dev/null; then
for port in `pg_lsclusters --no-header | awk '{ print $3 }'`; do
for database in `su postgres -l -c "psql -p $port -A -q -t -c 'SELECT datname FROM pg_database;'"`; do
if [ "$database" = "postgres" ] || [ "$database" = "template0" ] || [ "$database" = "template1" ]; then continue; fi
nice -n 19 su postgres -l -c "pg_dump -p $port -Fc $database > ${tmp}/pg_${port}_${database}.dump"
done
done
fi
# Backup LDAP
if command -v slapcat>/dev/null; then
slapcat -l $tmp/ldap.ldif
fi