# The local demo's policy (STACK.md). For your own policy start from policies/example.yaml.
# Every field is described in POLICY.md.

# Customer types: a group names a profile and sets only what differs.
profiles:
  app-live:       { tier: gold, retention_days: 14 }
  data-interval:  { tier: rebuild_nightly, load: { mode: rebuild, writes: read-only, keep_loads: 14 } }
  data-scratch:   { tier: rebuild_nightly, load: { mode: rebuild, writes: read-write, protect_writes: false, keep_loads: 7 } }
  data-then-live: { tier: gold, load: { mode: once, writes: read-write, protect_writes: true } }

db_groups:
  - id: demo
    tenant: acme             # a label for selecting this customer's groups; not access control
    aliases:                 # the names applications connect to
      - acme-orders
      - acme-graph
      - acme-audit
    tier: gold
    retention_days: 7
    rto_minutes: 120
    # On a cluster, the shape a restore creates (omitted: the demo is a single server):
    #   topology: { primaries: 3, secondaries: 0 }

# Crons run in UTC in Dagster, in Airflow's default timezone in Airflow.
tiers:
  gold:   { full_cron: "0 2 * * *", diff_cron: "0 * * * *",   rpo_minutes: 90 }    # daily full, hourly diff
  silver: { full_cron: "0 3 * * 0", diff_cron: "0 */6 * * *", rpo_minutes: 420 }   # weekly full, 6-hourly diff
  bronze: { full_cron: "0 4 * * 0", diff_cron: "0 0 * * *",   rpo_minutes: 1500 }  # weekly full, daily diff
  # rebuild-only: groups whose loads restore them (no backups, so no point-in-time restore)
  rebuild_nightly: { rebuild_cron: "0 1 * * *", rpo_minutes: 1500 }
