backup: drop nonexistent --clear-retention flag from retention helper
This commit is contained in:
@@ -53,11 +53,11 @@ ignore {{ i.key | quote }} {{ i.value | map('quote') | join(' ') }}
|
||||
{% set retentions = kopia_backup.retention | default({}) | dict2items | rejectattr('value', 'none') | list %}
|
||||
{% if retentions %}
|
||||
|
||||
# Per-source retention overrides, applied as a whole (--clear-retention runs after the keep flags within one call).
|
||||
# Per-source retention overrides, applied as a whole. A keep flag of 0 means "inherit",
|
||||
# so setting all four flags explicitly fully defines the retention for the path.
|
||||
retention() {
|
||||
local path=$1; shift
|
||||
kopia policy set "$path" --clear-retention >/dev/null 2>&1 &&
|
||||
kopia policy set "$path" "$@" >/dev/null 2>&1 ||
|
||||
kopia policy set "$path" "$@" >/dev/null 2>&1 ||
|
||||
{ echo "setting the retention of $path failed" >&2; failed=1; }
|
||||
}
|
||||
{% for r in retentions %}
|
||||
|
||||
Reference in New Issue
Block a user