Werk #19911: metric-backend: Recover database schema after site restore
| Component | Metrics system | ||||
| Title | metric-backend: Recover database schema after site restore | ||||
| Date | Jun 16, 2026 | ||||
| Level | Trivial Change | ||||
| Class | Bug Fix | ||||
| Compatibility | Compatible - no manual interaction needed | ||||
| Checkmk versions & editions |
|
Previously, restoring a site from a backup left the metric backend's database without a usable schema.
As of now, the metric backend data is deliberately excluded from OMD backups. However, that means that the database schema needs to be applied after a restore.
This has been fixed. A new post-restore hook now runs the metric backend schema manager and brings the ClickHouse schema up to the latest revision of the restored version. A missing database is created from scratch, and an existing database is migrated to the latest revision. If the metric backend is not configured, the hook does nothing.