Skip to content

Integrity and objectives

A backup can go bad after it was written: the object store corrupts a byte, a lifecycle rule deletes an object, a person cleans up the wrong prefix. Tenax re-reads what it stored, marks each backup with how far it can be trusted, keeps a known-good point whatever retention says, and tells you when your real recovery point and recovery time drift away from what you need.

Trust levels

Every backup has one trust level. tenax backups shows it in the FLAGS column, and the API returns it as trust.

Level Meaning Chosen automatically
quarantined The stored data failed a check (it changed, or an object is missing). Never
suspicious Something about this point looks wrong. Restore it only on purpose, by ID. Never
verified A verification restore of it passed. Yes
restorable The scrub re-read every object and each one matched the manifest. Yes
uploaded Written and hashed while it was uploaded; nothing has re-read it yet. Yes

A restore without a backup ID (--at latest, or a point in time) only uses backups that are neither quarantined nor suspicious. To restore the newest backup that passed verification, use latest-verified:

tenax restore team/app --at latest-verified --to sandbox

Retention guards

On top of your daily, weekly, monthly and yearly tiers, retention always keeps:

  • backups named by a history tag;
  • the newest verified backup, so a known-good point exists even when the tiers would drop it;
  • quarantined backups for 30 days, as evidence of what changed and when.

Scrub

Each BackupStore is scrubbed once a day by a small Job. It reads stored objects back, streams them through SHA-256, and compares size and digest with the manifest. Each run reads up to a byte budget, never-scrubbed backups first, so successive runs cover the whole store.

in a BackupStore
spec:
  scrub:
    interval: 24h     # between runs (default 24h)
    maxBytes: 20Gi    # read per run (default 20Gi)
    minAge: 6h        # skip backups younger than this (default 6h)
    # disabled: true  # turn it off, for example on a store billed per request

When a backup does not match, Tenax:

  1. quarantines it, with the reason (for example …/data/base.zst.age does not match its SHA-256);
  2. emits a BackupQuarantined event on the store and on the target;
  3. takes a fresh full backup of the target at once, so a good recent point exists again.

The store's status shows the last run (lastScrubTime, lastScrubChecked, lastScrubFailed), and the full report is in the store at scrub/<time>.json. Read-only stores are not scrubbed. A scrub reads data back, so it costs egress and requests for the budget each interval.

Recoverability objectives

Set the objectives you need on a BackupPolicy, and Tenax measures them on every target that uses it:

in a BackupPolicy
spec:
  objectives:
    rpo: 15m             # the newest restorable point is at most this old
    rto: 30m             # a restore takes at most this long
    maxVerifiedAge: 8d   # a verification passed at most this long ago
Condition Measures
RPOMet The age of the newest restorable point: the end of the point-in-time window, else the last full backup.
RTOMet How long the last passed verification restore took. A target without a verification has no RTO yet.
VerifiedRecently The age of the last passed verification (default 8 days when a verify schedule is set).

Read them with kubectl describe backuptarget. When an objective is missed, Tenax corrects it, at most once every 12 hours per target: an old verification starts a new one; a slow restore takes a fresh full backup, which shortens the replay of the next restore.