forget old restic snapshots before prune
This commit is contained in:
parent
a834443ddc
commit
af70917ae8
1 changed files with 3 additions and 0 deletions
|
@ -17,6 +17,9 @@
|
||||||
${pkgs.zfs}/bin/zfs destroy tank/backup@prune || true
|
${pkgs.zfs}/bin/zfs destroy tank/backup@prune || true
|
||||||
${pkgs.zfs}/bin/zfs destroy tank/backup-old || 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
|
# Wait for the restic repository to be unlocked
|
||||||
while [ -n "$(${pkgs.restic}/bin/restic list locks)" ]; do
|
while [ -n "$(${pkgs.restic}/bin/restic list locks)" ]; do
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
Loading…
Reference in a new issue