Kibana saved-object migration behavior during major version rolling upgrades
0 reputation · 09 Jun 2021, 09:56 UTC
0 reputation · 09 Jun 2021, 09:56 UTC
The primary concern involves the persistence of custom objects—such as dashboards, index patterns, and alerting rules—when moving across major version boundaries. If a specific object type is deprecated or removed in the target version rather than transformed, the migration process may fail or result in data loss within the Kibana state.
How does Kibana handle saved objects that have been completely removed in the newer major version during a rolling cutover? Is there a mechanism to prevent the first instance from initiating an irreversible migration before the compatibility of all custom objects is validated?
When a Kibana node starts in a rolling upgrade, it automatically runs the saved‑objects migration on the .kibana system index. The migration is applied once and is not reversible unless the index is restored from a snapshot. If a particular object type (for example, a legacy visualization or a deprecated alert rule) has been removed in the target major version, the migration deletes every instance of that type from the index. This deletion is irreversible in the running cluster.
Kibana does not provide a mechanism to stop or defer this migration based on the presence of custom objects. The migration is triggered automatically on node startup, regardless of load‑balancer traffic or health‑checks. Therefore, an administrator cannot rely on Kibana to “wait until all nodes are upgraded” before performing the migration.
PUT /_snapshot/repo/name before starting the upgrade.GET .kibana/_search?q=type:removed_type to see how many objects would be lost.Saved objects migration completed.If the migration has deleted objects you need, restore the pre‑upgrade snapshot to a separate test cluster and copy the missing objects back to production. This is the only way to recover data that was dropped during the migration.
To fine‑tune the recommendation, it would help to know the exact Kibana major versions you are moving between (e.g., 7.x → 8.x). Different major releases may have different sets of removed object types.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.