diff --git a/postgresql/files/postgresql-backup.sh b/postgresql/files/postgresql-backup.sh index 43da19eb..5f8ddba5 100755 --- a/postgresql/files/postgresql-backup.sh +++ b/postgresql/files/postgresql-backup.sh @@ -34,7 +34,8 @@ LOCKFILE=${BACKUPDIR}/.dumplock umask 0077 if [ "$BUILD_DBLIST" == "yes" ] ; then # The psql -l command prints too much stuff - DB_LIST=$( psql -q -t -l -U postgres | grep -v template0 | grep -v template1 | grep -v : | grep -v ^\( | grep -v ^\- | awk '{print $1}' ) + #DB_LIST=$( psql -q -t -l -U postgres | grep -v template0 | grep -v template1 | grep -v : | grep -v ^\( | grep -v ^\- | awk '{print $1}' ) + DB_LIST=$( su - postgres -c "/usr/lib/postgresql/${PG_VERSION}/bin/oid2name " | awk '{print $2}' | tail -n +4 | grep -v template0 | grep -v template1 ) fi if [ ! -f $LOCKFILE ] ; then