aboutsummaryrefslogtreecommitdiff
path: root/databases/postgresql80-server/files
diff options
context:
space:
mode:
Diffstat (limited to 'databases/postgresql80-server/files')
-rw-r--r--databases/postgresql80-server/files/502.pgsql6
1 files changed, 3 insertions, 3 deletions
diff --git a/databases/postgresql80-server/files/502.pgsql b/databases/postgresql80-server/files/502.pgsql
index 09591559c317..acc1afe431cf 100644
--- a/databases/postgresql80-server/files/502.pgsql
+++ b/databases/postgresql80-server/files/502.pgsql
@@ -56,15 +56,15 @@ case "$daily_pgsql_backup_enable" in
# Protect the data
umask 077
- dbnames=`su -l pgsql -c "psql -q -t -A -d template1 -c SELECT\ datname\ FROM\ pg_database\ WHERE\ datname!=\'template0\'"`
+ dbnames=`su -l pgsql -c "umask 077; psql -q -t -A -d template1 -c SELECT\ datname\ FROM\ pg_database\ WHERE\ datname!=\'template0\'"`
rc=$?
now=`date "+%Y-%m-%dT%H:%M:%S"`
file=${daily_pgsql_backupdir}/pgglobals_${now}
- su -l pgsql -c "pg_dumpall -g | gzip -9 > ${file}.gz"
+ su -l pgsql -c "umask 077; pg_dumpall -g | gzip -9 > ${file}.gz"
for db in ${dbnames}; do
echo -n " $db"
file=${backupdir}/pgdump_${db}_${now}
- su -l pgsql -c "pg_dump ${daily_pgsql_pgdump_args} -f ${file} ${db}"
+ su -l pgsql -c "umask 077; pg_dump ${daily_pgsql_pgdump_args} -f ${file} ${db}"
[ $? -gt 0 ] && rc=3
done