Retention by Policy
Before You Beginâ
âšī¸ Before creating a retention policy, it is essential to fully understand how it works. Please refer to the retention documentation: âĄī¸ Backup Retention
Usageâ
Define Retentionâ
| Key | Parameter | Control |
|---|---|---|
| Configuration.Node.Retention | [at < path >] after < value > (days | weeks) keep ((every < value > (hours|days|weeks))|none) | Allows defining a retention rule. Rules apply to the node if specified, otherwise to the entire selection. |
Operation:
-
Path: it is possible to specify the path from which the retention model is applied. This is done using the optional
at <path>parameter. If this parameter is not used, the retention model is applied to the entire target account. The<path>variable must be replaced with the desired path (preferably enclosed in quotes). -
Point in time:
-
Filter: this part defines the history to keep. The filter is defined by
keep ((every < value > (hours\|days\|weeks))\|none): -
[at < path >](optional): replace<path>with the path to which retention should be applied (preferably in quotes). If no path is specified, retention is applied at the root of the target account. -
after < value > (days|weeks): time point at which the filter is applied. In the expressionafter < value > (days \| weeks),valuemust be replaced with a numeric value and(days|weeks)must be eitherdaysorweeksdepending on the desired time scale. -
keep ((every < value > (hours|days|weeks))|none): period during which a version is kept (if any).valueis a numeric value and the unit can behours,days, orweeks. The value/unit pair can also be replaced with the valuenoneto keep no data (keep nonein this case).
Allow Manual Additionsâ
| Key | Parameter | Control |
|---|---|---|
| Configuration.Node.Retention.MergeUser | true | false | Allows the user to add their own retention rules |
Operation:
Injecting a policy-based configuration prevents any user modification.
To allow a user to manually add retention rules, use the policy key Configuration.Node.Retention.MergeUser with the value true.
The user will then be able to add additional retention rules without modifying those injected by policy.
Examplesâ
Linear 30-Day Retentionâ
Define a linear 30-day retention for the entire account:
# Linear 30-day retention
Configuration.Node.Retention : after 30 days keep none
Progressive 10-Year Retentionâ
10-year retention with decreasing granularity over time and across the entire account using the following model:
- After 4 weeks, keep at most one version per week
- After 1 quarter, keep at most one version per quarter
- After 1 year, keep at most one version per year
- After 10 years, keep nothing
# Progressive 10-year retention
Configuration.Node.Retention : after 4 weeks keep every 1 week
: after 13 weeks keep every 13 weeks
: after 52 weeks keep every 52 weeks
: after 520 weeks keep none
One-Week Retention on a Specific Pathâ
Keep history for one week on the path c:\dbdump\.
# One-week retention on path c:\dbdump\
Configuration.Node.Retention : at "c:\dbdump\" after 1 weeks keep none
One-Week Retention on a Specific Path and 30 Days on the Rest of the Accountâ
It is possible to combine the examples above.
# 30-day retention and one week on path c:\dbdump\
Configuration.Node.Retention : after 30 days keep none
: at "c:\dbdump\" after 1 weeks keep none