diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-30 11:37:46 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-30 11:39:59 +0200 |
commit | 70f09e06f7f400fa4fbabf0c4fff09cd2208a932 (patch) | |
tree | 69d6128e2a09da648d7a81f90d25cd8a1918bfc0 /backup.in | |
parent | dbd71155f0bb40e435163ddd2c73c991a4f8e787 (diff) | |
download | beam-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.in | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 |