Skip to content

Commit

Permalink
Limit snapshot pruning to the current host (#94)
Browse files Browse the repository at this point in the history
* Limit snapshot pruning to the current host

Address #70 by only pruning snapshots from the current host by default when performing maintenance.  This avoids inadvertently pruning snapshots from other hosts when that might not be desired.

* add back 'host' to group-by

I think it's safer to keep `--group-by 'host,tags'` even if the `--host` parameter is provided. This makes sure that the `forget` always groups together snapshots from the same host. It may be unneeded.

---------

Co-authored-by: Kevin Woley <[email protected]>
  • Loading branch information
living180 and kmwoley authored Nov 10, 2024
1 parent b33d2d1 commit 7609b81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $AdditionalBackupParameters = @("--exclude-if-present", ".nobackup")

# maintenance configuration
$SnapshotMaintenanceEnabled = $true
$SnapshotRetentionPolicy = @("--group-by", "host,tags", "--keep-daily", "30", "--keep-weekly", "52", "--keep-monthly", "24", "--keep-yearly", "10")
$SnapshotRetentionPolicy = @("--host", $env:COMPUTERNAME, "--group-by", "host,tags", "--keep-daily", "30", "--keep-weekly", "52", "--keep-monthly", "24", "--keep-yearly", "10")
$SnapshotPrunePolicy = @("--max-unused", "1%")
$SnapshotMaintenanceInterval = 7
$SnapshotMaintenanceDays = 30
Expand Down

0 comments on commit 7609b81

Please sign in to comment.