Skip to content

Retention

Retention decides which restore points a device keeps. It is set per device and has two rules:

Rule Keeps
Keep newest N snapshots The N most recent restore points
Keep for N days Every restore point newer than N days

A restore point is kept if either rule keeps it. A value of 0 turns that rule off. With both at 0, nothing is ever pruned.

Set retention

  • For one device: in the tenant admin portal, open Agents, then Retention on the device, and set the two values.
  • For new devices: in the global admin portal, Settings > Backup defaults holds the default retention a device gets when it enrols. The default is 0 and 0: keep everything.

Pruning

Pruning removes restore points that fall outside retention, then frees the storage they used. It runs when you ask for it:

  1. In the tenant admin portal, open Remote Engine and choose Prune on an online device, or
  2. run cvn-agent prune on the device. See Agent command line.

A prune has three steps:

  1. The server deletes the records of restore points outside retention.
  2. The agent lists the objects in storage and deletes chunks and manifests that no remaining restore point uses.
  3. The agent reports the freed space, and the server lowers the tenant's storage usage.

Objects still under an S3 Object Lock cannot be deleted yet. The agent skips them, and a later prune removes them once the lock has ended.

Retention and object locks

On S3 storage with Object Lock, the lock on each new object lasts at least the device's Keep for N days value. An enforced policy with a longer retention lengthens the lock for its devices. See Immutability and ransomware.

The lock length is fixed when an object is written. Shortening retention later does not unlock objects that were already written; they stay until their lock ends.

Choosing values

  • Keep enough history to cover the time it takes to notice a problem. Ransomware and accidental deletions are often found days or weeks later.
  • With Object Lock, every extra day of retention is a day of storage you pay for and cannot delete early.
  • Count-based retention alone suits devices that back up irregularly, such as laptops. Day-based retention suits servers on a fixed schedule.

Edit or report a problem