aboutsummaryrefslogtreecommitdiff
path: root/backup.in
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-10-30 11:37:46 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2012-10-30 11:39:59 +0200
commit70f09e06f7f400fa4fbabf0c4fff09cd2208a932 (patch)
tree69d6128e2a09da648d7a81f90d25cd8a1918bfc0 /backup.in
parentdbd71155f0bb40e435163ddd2c73c991a4f8e787 (diff)
downloadbeam-70f09e06f7f400fa4fbabf0c4fff09cd2208a932.tar.gz
beam-70f09e06f7f400fa4fbabf0c4fff09cd2208a932.tar.bz2
Create database dumps in temporary directory.
* backup.in: Set safe umask. * lib/beam/common.in (backup_tmp_dir): New global variable. * beam.conf: Add backup_tmp_dir variable. * doc/beam.conf.5in: Document new variables. * lib/beam/mysql.sh: Create temporary files in backup_tmp_dir * lib/beam/postgres.sh: Likewise.
Diffstat (limited to 'backup.in')
-rw-r--r--backup.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/backup.in b/backup.in
index 046953d..615fa12 100644
--- a/backup.in
+++ b/backup.in
@@ -121,6 +121,8 @@ backup() {
logit "finished"
}
+umask ${backup_umask:-077}
+
if [ -n "$backup_logfile" ]; then
runhook openlog_hook
exec >>$backup_logfile
@@ -129,11 +131,8 @@ fi
if [ -z "$backup_notify_email" ]; then
backup
else
- u=$(umask)
- umask 077
report=$backup_snapshot_dir/report.$$
touch $report
- umask $u
backup 2>&1 | tee $report
mail_report $report
rm $report

Return to:

Send suggestions and report system problems to the System administrator.