forget old restic snapshots before prune

This commit is contained in:
Charlotte 🦝 Delenk 2022-09-12 11:34:40 +01:00
parent a834443ddc
commit af70917ae8
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -17,6 +17,9 @@
${pkgs.zfs}/bin/zfs destroy tank/backup@prune || true
${pkgs.zfs}/bin/zfs destroy tank/backup-old || true
# remove old backups
${pkgs.restic}/bin/restic forget --keep-daily 14 --keep-weekly 8 --keep-monthly 24 --keep-yearly 10
# Wait for the restic repository to be unlocked
while [ -n "$(${pkgs.restic}/bin/restic list locks)" ]; do
sleep 10