backup: drop nonexistent --clear-retention flag from retention helper
This commit is contained in:
@@ -53,10 +53,10 @@ ignore {{ i.key | quote }} {{ i.value | map('quote') | join(' ') }}
|
|||||||
{% set retentions = kopia_backup.retention | default({}) | dict2items | rejectattr('value', 'none') | list %}
|
{% set retentions = kopia_backup.retention | default({}) | dict2items | rejectattr('value', 'none') | list %}
|
||||||
{% if retentions %}
|
{% 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() {
|
retention() {
|
||||||
local path=$1; shift
|
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; }
|
{ echo "setting the retention of $path failed" >&2; failed=1; }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user