containers/bkp: always preserve latest backup on target
This commit is contained in:
parent
a4413cc128
commit
650da98422
1 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ in {
|
||||||
path = with pkgs; [ btrfs-progs btrbk coreutils ];
|
path = with pkgs; [ btrfs-progs btrbk coreutils ];
|
||||||
|
|
||||||
script = let
|
script = let
|
||||||
bktrbkConf = pkgs.writeText "cfg" ''
|
btrbkConf = pkgs.writeText "cfg" ''
|
||||||
timestamp_format long
|
timestamp_format long
|
||||||
ssh_identity ${passwords.storage.homeChBackup.keyPath}
|
ssh_identity ${passwords.storage.homeChBackup.keyPath}
|
||||||
ssh_user ${passwords.storage.homeChBackup.user}
|
ssh_user ${passwords.storage.homeChBackup.user}
|
||||||
|
@ -71,7 +71,7 @@ in {
|
||||||
snapshot_create onchange
|
snapshot_create onchange
|
||||||
snapshot_preserve_min latest
|
snapshot_preserve_min latest
|
||||||
snapshot_preserve 7d 4w
|
snapshot_preserve 7d 4w
|
||||||
target_preserve_min no
|
target_preserve_min latest
|
||||||
target_preserve 7d 4w 12m *y
|
target_preserve 7d 4w 12m *y
|
||||||
|
|
||||||
volume ${subvolumeParentDir}
|
volume ${subvolumeParentDir}
|
||||||
|
@ -82,7 +82,7 @@ in {
|
||||||
#! ${pkgs.bash}/bin/bash
|
#! ${pkgs.bash}/bin/bash
|
||||||
set -Eeuxo pipefail
|
set -Eeuxo pipefail
|
||||||
|
|
||||||
btrbk -c ${bktrbkConf} --progress ''${@:-run}
|
btrbk -c ${btrbkConf} --progress ''${@:-run}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue