fix restic prune

This commit is contained in:
Charlotte 🦝 Delenk 2022-09-12 17:59:47 +01:00
parent 05cee346d8
commit 81bb6095dc
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -41,9 +41,9 @@
set -ex
# Wait for the restic repository to be unlocked
while [ -n "$(${pkgs.restic}/bin/restic list locks)" ]; then
while [ -n "$(${pkgs.restic}/bin/restic list locks)" ]; do
sleep 10
fi
done
# make the original read-only
${pkgs.zfs}/bin/zfs set readonly=on tank/backup
@ -64,6 +64,7 @@
# Destroy the old dataset
${pkgs.zfs}/bin/zfs destroy -rf tank/backup-old
${pkgs.zfs}/bin/zfs destroy tank/backup@prune
sleep 15
${pkgs.zfs}/bin/zfs mount tank/backup
'';
in {