Skip to main content

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​

KeyParameterControl
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 expression after < value > (days \| weeks), value must be replaced with a numeric value and (days|weeks) must be either days or weeks depending on the desired time scale.

  • keep ((every < value > (hours|days|weeks))|none): period during which a version is kept (if any). value is a numeric value and the unit can be hours, days, or weeks. The value/unit pair can also be replaced with the value none to keep no data (keep none in this case).

Allow Manual Additions​

KeyParameterControl
Configuration.Node.Retention.MergeUsertrue | falseAllows 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