Skip to content

Verification

A backup nobody has restored is a hope. Keeper restores your backups on a schedule, checks them, and marks the ones that pass as verified.

in a BackupPolicy
spec:
  verify:
    schedule: "17 4 * * 0"          # weekly, Sunday 04:17 in the policy's time zone
    checks: [inventory-matches, row-estimates-within-10pct, target-checks]
    randomPointInTime: true          # also restore a random second inside the window

On schedule, the controller creates a Restore into a sandbox from the latest backup, and from a random point in the window when streams exist. Then it runs the checks:

Check Passes when
inventory-matches The restored tables and schema fingerprint match the backup's inventory.
schema-matches The schema fingerprint matches.
row-estimates-within-NNpct Every table's row count is within NN % of the inventory's estimate.
target-checks Every SQL check declared on the target returns true.

Target checks are plain SQL that must return a single true value:

in a BackupTarget
spec:
  checks:
    - name: orders-not-empty
      database: app
      sql: select count(*) > 0 from orders
    - name: recent-orders
      database: app
      sql: select max(created_at) > now() - interval '2 days' from orders

A passing run tags the backup verified and records the restore time, exported as keeper_verify_rto_seconds. A failing run fires KeeperVerificationFailed; no successful run for 8 days fires KeeperVerificationOverdue. Run one by hand with keeper verify team-a/app --wait, or with Verify now on the target's page.