aboutsummaryrefslogtreecommitdiff
path: root/lib/beam
diff options
context:
space:
mode:
Diffstat (limited to 'lib/beam')
-rw-r--r--lib/beam/common.in1
-rwxr-xr-xlib/beam/mysql.sh8
-rwxr-xr-xlib/beam/postgres.sh8
3 files changed, 9 insertions, 8 deletions
diff --git a/lib/beam/common.in b/lib/beam/common.in
index 4c6cd21..1be075e 100644
--- a/lib/beam/common.in
+++ b/lib/beam/common.in
@@ -30,6 +30,7 @@ backup_archive_dir=
backup_snapshot_dir=
backup_verbose=
backup_logfile="/var/log/backup"
+backup_tmp_dir=/tmp
error() {
echo >&2 $0: $*
diff --git a/lib/beam/mysql.sh b/lib/beam/mysql.sh
index 4ce3a88..185fa48 100755
--- a/lib/beam/mysql.sh
+++ b/lib/beam/mysql.sh
@@ -61,9 +61,9 @@ mysql_backup() {
cmd="$cmd --databases"
fi
if [ -z "$dry_run" ]; then
- $cmd $database > $backup_snapshot_dir/$1-$week-$round-$level
+ $cmd $database > $backup_tmp_dir/$1-$week-$round-$level
else
- echo "$cmd $database > $backup_snapshot_dir/$1-$week-$round-$level"
+ echo "$cmd $database > $backup_tmp_dir/$1-$week-$round-$level"
fi
if [ $? -ne 0 ]; then
@@ -73,9 +73,9 @@ mysql_backup() {
logit "creating $1-$week-$round-$level.$tar_suffix"
$dry_run tar $verbose $taroptions \
-f $backup_archive_dir/$1-$week-$round-$level.$tar_suffix \
- -C $backup_snapshot_dir $1-$week-$round-$level
+ -C $backup_tmp_dir $1-$week-$round-$level
tarcode $?
- $dry_run rm $backup_snapshot_dir/$1-$week-$round-$level
+ $dry_run rm $backup_tmp_dir/$1-$week-$round-$level
fi
}
diff --git a/lib/beam/postgres.sh b/lib/beam/postgres.sh
index 0eba767..b5a9b6e 100755
--- a/lib/beam/postgres.sh
+++ b/lib/beam/postgres.sh
@@ -45,9 +45,9 @@ postgres_backup() {
logit "backing up PostgreSQL database $database"
test -z "$database" && abend 1 "${1}_database not set"
if [ -z "$dry_run" ]; then
- su postgres -c "pg_dump $verbose $database" > $backup_snapshot_dir/$1-$week-$round-$level
+ su postgres -c "pg_dump $verbose $database" > $backup_tmp_dir/$1-$week-$round-$level
else
- echo "su postgres -c \"pg_dump $verbose $database\" > $backup_snapshot_dir/$1-$week-$round-$level"
+ echo "su postgres -c \"pg_dump $verbose $database\" > $backup_tmp_dir/$1-$week-$round-$level"
fi
if [ $? -ne 0 ]; then
@@ -57,9 +57,9 @@ postgres_backup() {
logit "creating $1-$week-$round-$level.$tar_suffix"
$dry_run tar $verbose $taroptions \
-f $backup_archive_dir/$1-$week-$round-$level.$tar_suffix \
- -C $backup_snapshot_dir $1-$week-$round-$level
+ -C $backup_tmp_dir $1-$week-$round-$level
tarcode $?
- $dry_run rm $backup_snapshot_dir/$1-$week-$round-$level
+ $dry_run rm $backup_tmp_dir/$1-$week-$round-$level
fi
}

Return to:

Send suggestions and report system problems to the System administrator.