aboutsummaryrefslogtreecommitdiff
path: root/databases/postgresql91-server/files
diff options
context:
space:
mode:
authorNick Sayer <nsayer@FreeBSD.org>2002-11-06 01:41:53 +0000
committerNick Sayer <nsayer@FreeBSD.org>2002-11-06 01:41:53 +0000
commitb77926499ee26e9c1fed44d15a969dd9081548eb (patch)
tree9d2133170a7b44f1f991c540f2338a3a37251d0c /databases/postgresql91-server/files
parent0d1705d732caface2080467be20a9bf21b25e954 (diff)
downloadports-b77926499ee26e9c1fed44d15a969dd9081548eb.tar.gz
ports-b77926499ee26e9c1fed44d15a969dd9081548eb.zip
Port update submitted by maintainer
PR: ports/44983 Submitted by: girgen@pingpong.net
Notes
Notes: svn path=/head/; revision=69555
Diffstat (limited to 'databases/postgresql91-server/files')
-rw-r--r--databases/postgresql91-server/files/502.pgsql4
1 files changed, 3 insertions, 1 deletions
diff --git a/databases/postgresql91-server/files/502.pgsql b/databases/postgresql91-server/files/502.pgsql
index 3a44f1132ac8..c372163f7407 100644
--- a/databases/postgresql91-server/files/502.pgsql
+++ b/databases/postgresql91-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