zfsborg: sleep a bit before mounting

This commit is contained in:
Motiejus Jakštys 2023-09-18 10:06:44 +03:00
parent 2c4598ba7b
commit 537800ec59

View File

@ -4,8 +4,9 @@
pkgs,
...
}: let
mkPreHook = mountpoint: zfs_name: ''
mkPreHook = mountpoint: zfs_name: i: ''
set -x
sleep ${toString i}
mkdir "$RUNTIME_DIRECTORY/snapshot"
${pkgs.util-linux}/bin/mount \
-t zfs \
@ -78,7 +79,7 @@ in {
extraArgs = "--remote-path=borg1";
compression = "auto,lzma";
startAt = attrs.backup_at;
preHook = mkPreHook mountpoint fs.device;
preHook = mkPreHook mountpoint fs.device i;
prune.keep = {
within = "1d";
daily = 7;