add the ability to set a pruning policy

defaulted to --max-unused 1% in configuration.
This commit is contained in:
Kevin Woley
2021-02-24 21:02:41 -08:00
parent a840f5ae04
commit 01a38f893a
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ function Invoke-Maintenance {
# prune (remove) data from the backup step. Running this separate from `forget` because
# `forget` only prunes when it detects removed snapshots upon invocation, not previously removed
Write-Output "[[Maintenance]] Start pruning..." | Tee-Object -Append $SuccessLog
& $ResticExe prune 3>&1 2>> $ErrorLog | Tee-Object -Append $SuccessLog
& $ResticExe prune $SnapshotPrunePolicy 3>&1 2>> $ErrorLog | Tee-Object -Append $SuccessLog
if(-not $?) {
Write-Output "[[Maintenance]] Prune operation completed with errors" | Tee-Object -Append $ErrorLog | Tee-Object -Append $SuccessLog
$maintenance_success = $false