At a glance
The number of hours since your last verified, successful ClickHouse backup completed. For a platform team, this is the single most important “can we recover?” number on the board. It does not measure whether backups are scheduled; it measures whether one actually finished. A backup job that is configured but silently failing for three days reads exactly the same as no backup at all, and this card is what catches that gap before a disk failure or a bad ALTER turns it into data loss.
Calculation
For a self-managed ClickHouse instance, the engine queries the backup catalogue and takes the freshest completed run:hours_ago is the headline. If system.backups has no BACKUP_CREATED row at all (for example after a server restart, since system.backups is in-memory and does not survive a restart), the engine falls back to the destination listing: it reads the newest object timestamp under the configured BACKUP TO S3(...) bucket or Disk(...) path and uses that as end_time. This fallback is why a restart does not spuriously turn the card red.
On ClickHouse Cloud, there is no BACKUP TO recovery path to read; the engine reads the last completed entry in the managed snapshot timeline and computes the same age. Cloud snapshots run on the service’s configured cadence (commonly every 24 hours plus continuous incremental backup), so a healthy Cloud service reads well under the 72h threshold at all times.
The card stores the raw end_time alongside the age so that a panel reload recomputes against the current clock rather than caching a stale “hours ago” string.
Worked example
A platform team runs a self-managed 3-node ClickHouse cluster behind a clickstream and order-events analytics workload. Backups are scheduled by cron at 02:00 UTC daily via aBACKUP DATABASE events TO S3(...) statement. Snapshot taken on 14 Apr 26 at 09:15 UTC.
The card reads Last Successful Backup: 7h ago (green). The DBA drills in and sees the system.backups history:
Three things the team reads from this:
- The clock is healthy now (7h). The 02:18 run completed normally, so the recovery point is the early hours of 14 Apr. Recovery Point Objective (RPO) exposure is at most the 7 hours of events ingested since then.
- There was a hidden near-miss. The 12 Apr run is
BACKUP_FAILED. The card never reset the clock to it (it only countsBACKUP_CREATED), so on 12 Apr the card would have read~34hand on 13 Apr morning it would still have read against the 11 Apr success at~79h, which is past the 72h alert. The team should confirm an alert fired on 13 Apr and that the 12 Apr failure (disk-full on the S3 staging mount) was the cause. - Daily cadence with one allowed miss. With a 24h schedule and a 72h alert, the team tolerates two consecutive missed runs before the board goes red. That is the right buffer for a daily job, but tighten the threshold to
> 30hif the RPO target is “lose at most one day”.
ALTER TABLE ... DROP PARTITION mistake, a corrupted part, or a lost volume has no clean recovery point within your RPO. Re-run the backup manually, fix the root cause of the failed runs, and only then stand down.
Sibling cards platform teams should reference together
Reconciling against the source
Where to look in ClickHouse itself:Why our number may legitimately differ from a manual check:system.backupsfor the authoritative per-run history on a self-managed instance:SELECT name, status, start_time, end_time, error FROM system.backups ORDER BY end_time DESC. Theerrorcolumn tells you why aBACKUP_FAILEDrow failed. The backup destination directly: list the S3 bucket orDisk(...)path theBACKUP TOclause targets and compare the newest object timestamp to the card. This survives restarts wheresystem.backupsdoes not. ClickHouse Cloud: the service’s Backups view in the Cloud console for the managed snapshot timeline, including the configured backup schedule and retention.
Cross-connector reconciliation:
Known limitations / FAQs
The card is green but I am not sure the backup is restorable. Does “successful” mean “tested”? No.BACKUP_CREATED (or a completed Cloud snapshot) means the backup wrote successfully; it does not mean anyone has performed a test restore. A backup you have never restored is a hypothesis, not a guarantee. Schedule periodic RESTORE drills into a throwaway database and confirm row counts. The card measures freshness of creation, which is necessary but not sufficient for true recoverability.
My server restarted and the card briefly showed a much older age. Why?
system.backups is an in-memory system table and is cleared on every restart. Immediately after a restart it has no BACKUP_CREATED rows, so the engine falls back to listing the backup destination (S3 bucket or disk path) and using the newest object timestamp. If the connector cannot reach that destination, the age can read stale until the next scheduled backup repopulates the table. Confirm the connector has read access to the backup destination.
We are on ClickHouse Cloud and never run BACKUP TO. What is this card reading?
The managed snapshot timeline. ClickHouse Cloud takes automatic backups on a configured schedule with continuous incremental backup; the card reads the last completed snapshot and computes its age. You do not need to run any BACKUP statement. If the value ever exceeds your threshold on Cloud, that points to a service-level issue worth raising with support, not a job you forgot to schedule.
A backup ran 10 minutes ago but failed. Why didn’t the clock reset?
By design. The engine only resets against status = 'BACKUP_CREATED'. A BACKUP_FAILED run is explicitly excluded so that a silently failing job cannot mask a growing recovery gap. This is the whole point of the card: a configured-but-failing backup should read exactly as bad as no backup. Check the error column in system.backups for the failure reason.
What threshold should I set instead of 72h?
Match it to your RPO and backup cadence. For a daily job with a “lose at most one day” RPO, set > 30h (one missed run trips it). For an hourly incremental strategy, set it much lower, for example > 3h. The 72h default is deliberately forgiving for a daily schedule so that a single transient failure does not page anyone, while two consecutive failures do.
Does a single-table backup count the same as a full-database backup?
For the age calculation, yes: any BACKUP_CREATED resets the clock. But coverage is a separate question the card cannot infer. If your recovery plan needs the full database and only a single table was backed up, the card will read green while your real exposure is high. Use a consistent full-database (or full-set-of-databases) backup as your scheduled job, and treat ad-hoc single-table backups as extras, not as the thing that satisfies your RPO.
We back up to S3 with an external tool, not BACKUP TO. Will the card work?
Only via the destination-listing fallback, and only if you point the connector at the exact bucket/prefix the tool writes to. Tools like clickhouse-backup do not populate system.backups, so the in-memory read returns nothing and the engine relies entirely on the object timestamps at the destination. Where possible, prefer the native BACKUP TO S3(...) path so system.backups carries authoritative status and error detail.