Data retention
How long things are kept, why it matters, and what cannot be re-fetched.
Settings → Platform → Data Retention controls how long data is kept.
Two layers
| Layer | Set by |
|---|---|
| Global defaults | RETENTION_METRICS_DAYS, RETENTION_TELEMETRY_DAYS — both default to 90 days |
| Per-organisation policies | This page |
A daily cleanup worker applies both.
What is covered
| Group | Examples |
|---|---|
| Metrics | cf_metrics, prometheus_metrics, elk_metrics, cf_lb_analytics, cf_lb_geo, cf_lb_region_pool |
| Telemetry | Error tracking, release health, APM, analytics, anomaly |
| Audit | Audit log, query audit |
| Delivery | Notification delivery log |
Choosing a period
| Consideration | |
|---|---|
| Debugging | You want at least one full business cycle — usually a month |
| Trend analysis | Year-on-year comparison needs a year |
| Compliance | May set a minimum |
| Privacy | May set a maximum |
| Storage | Growth is linear in retention |
Where compliance requires a minimum, set it explicitly rather than relying on a default that somebody may change later for unrelated reasons.
What cannot be re-fetched
Most external data can be pulled again — within the source's own retention.
Some cannot. cf_lb_region_pool holds the observed region→pool split that
Cloudflare keeps for only about three days. Prune it and that history is
gone permanently; no re-fetch can recover it.
If you need long-range routing analysis, set a longer retention for that table than for the rest. See Load balancing.
Adding a new table
If you add a high-volume table, add it to the cleanup worker's retention list. A table that is written and never pruned grows forever, and it will not be noticed until the disk fills. See Workers.
Deleting a person's data
Where a privacy regime requires erasure, it is done through the retention tooling rather than by hand, so the deletion is recorded and complete.
Related
- Backups — retention of backups is a separate setting
- Cloud spend — storage growth shows up here first
Where this behaviour lives: backend/internal/worker/cleanup.go, frontend/src/app/retention/. If the code and this page disagree, the code is right — please fix the page.
Part of Administration — Settings, retention, platform thresholds and change tracking.