[#373] pruning: add optional regex field to last_n rule

fixes #373
This commit is contained in:
Christian Schwarz
2020-08-31 14:05:32 +02:00
parent 428a60870a
commit b1f8cdf385
5 changed files with 76 additions and 18 deletions

View File

@@ -175,9 +175,11 @@ Policy ``last_n``
keep_receiver:
- type: last_n
count: 10
regex: ^zrepl_.*$ # optional
...
``last_n`` keeps the last ``count`` snapshots (last = youngest = most recent creation date).
``last_n`` filters the snapshot list by ``regex``, then keeps the last ``count`` snapshots in that list (last = youngest = most recent creation date)
All snapshots that don't match ``regex`` or exceed ``count`` in the filtered list are destroyed unless matched by other rules.
.. _prune-keep-regex: