containers/bkp: always preserve latest backup on target

This commit is contained in:
steveej 2021-02-08 12:41:23 +01:00
parent a4413cc128
commit 650da98422

View file

@ -60,7 +60,7 @@ in {
path = with pkgs; [ btrfs-progs btrbk coreutils ];
script = let
bktrbkConf = pkgs.writeText "cfg" ''
btrbkConf = pkgs.writeText "cfg" ''
timestamp_format long
ssh_identity ${passwords.storage.homeChBackup.keyPath}
ssh_user ${passwords.storage.homeChBackup.user}
@ -71,7 +71,7 @@ in {
snapshot_create onchange
snapshot_preserve_min latest
snapshot_preserve 7d 4w
target_preserve_min no
target_preserve_min latest
target_preserve 7d 4w 12m *y
volume ${subvolumeParentDir}
@ -82,7 +82,7 @@ in {
#! ${pkgs.bash}/bin/bash
set -Eeuxo pipefail
btrbk -c ${bktrbkConf} --progress ''${@:-run}
btrbk -c ${btrbkConf} --progress ''${@:-run}
'';
};