summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-04-17 06:00:48 +0200
committertv <tv@krebsco.de>2016-04-17 06:00:48 +0200
commit377b0dff1ca075a9b57660d8e2ec3596fd3e08e7 (patch)
tree8610087f4d52e815f5de7b30c94ecb5caf869ef2 /krebs/3modules
parent70c27e21b1a31aac678a0a19127d86395e2b115e (diff)
krebs.backup: don't create plan.dst.path implicitly
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/backup.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/krebs/3modules/backup.nix b/krebs/3modules/backup.nix
index 22c860b87..4172c9800 100644
--- a/krebs/3modules/backup.nix
+++ b/krebs/3modules/backup.nix
@@ -129,6 +129,7 @@ let
rsync "$@"
}
remote_rsync=${shell.escape (concatStringsSep " && " [
+ "stat ${shell.escape plan.dst.path} >/dev/null"
"mkdir -m 0700 -p ${shell.escape plan.dst.path}/current"
"exec flock -n ${shell.escape plan.dst.path} rsync"
])}
@@ -148,6 +149,7 @@ let
}
rsh="ssh -F /dev/null -i $identity -p $src_port"
local_rsync() {
+ stat ${shell.escape plan.dst.path} >/dev/null
mkdir -m 0700 -p ${shell.escape plan.dst.path}/current
flock -n ${shell.escape plan.dst.path} rsync "$@"
}
@@ -230,7 +232,6 @@ in out
# TODO don't cancel plans on activation
# also, don't hang while deploying at:
# starting the following units: backup.wu-home-xu.push.service, backup.wu-home-xu.push.timer
-# TODO make sure /bku is properly mounted
# TODO make sure that secure hosts cannot backup to insecure ones
# TODO optionally only backup when src and dst are near enough :)
# TODO try using btrfs for snapshots (configurable)