diff options
Diffstat (limited to 'databases/postgresql83-server')
-rw-r--r-- | databases/postgresql83-server/files/502.pgsql | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/databases/postgresql83-server/files/502.pgsql b/databases/postgresql83-server/files/502.pgsql index 3a44f1132ac8..c372163f7407 100644 --- a/databases/postgresql83-server/files/502.pgsql +++ b/databases/postgresql83-server/files/502.pgsql @@ -53,10 +53,12 @@ echo "PostgreSQL maintenance" umask 077 dbnames=`psql -q -t -A -d template1 -c "SELECT datname FROM pg_database WHERE datname != 'template0'"` rc=$? +file=${PGBACKUPDIR}/pgglobals_`date "+%Y%m%d"` +pg_dumpall -g | gzip -9 > ${file}.gz for db in ${dbnames}; do echo -n " $db" file=${PGBACKUPDIR}/pgdump_${db}_`date "+%Y%m%d"` - pg_dump ${PGDUMP_ARGS} -d $db -f ${file} + pg_dump ${PGDUMP_ARGS} -f ${file} ${db} [ $? -gt 0 ] && rc=3 done |