Roll back to a previous version of Kibana

edit

Roll back to a previous version of Kibana

edit

If you’ve followed preparing for migration and resolving migration failures, and Kibana is still unable to successfully upgrade, rollback Kibana until you’re able to identify and fix the root cause.

Before you roll back Kibana, ensure that the version you want to roll back to is compatible with your Elasticsearch cluster. If the version you want to roll back to is not compatible, you must also rollback Elasticsearch. Any changes made after an upgrade are lost when you roll back to a previous version.

To roll back after a failed upgrade migration, you must also roll back the Kibana feature state to be compatible with the previous Kibana version.

Roll back by restoring the Kibana feature state from a snapshot

edit
  1. Before proceeding, take a snapshot that contains the kibana feature state. By default, snapshots include the kibana feature state.
  2. To make sure no Kibana instances are performing an upgrade migration, shut down all Kibana instances.
  3. Restore the kibana feature state from a snapshot taken before the failed Kibana upgrade. The following Elasticsearch request will only restore the Kibana feature state

    POST _snapshot/my_repository/my_snapshot_2099.05.06/_restore
    {
      "indices": "-*", 
      "feature_states": ["kibana"]
    }

    Exclude all indices and data streams from the restore operation to ensure that only the Kibana system indices included in the Kibana feature state will be restored.

  4. Start all Kibana instances on the older version you want to rollback to.

(Not supported) Roll back without a backup snapshot

edit

Rolling back without a backup snapshot is not supported and will be removed in a future version of Kibana.

  1. To make sure no Kibana instances are performing an upgrade migration, shut down all Kibana instances.
  2. Take a snapshot that includes the kibana feature state. By default, snapshots include the kibana feature state.
  3. Delete the version-specific indices created by the failed upgrade migration.

    For example, to rollback from a failed upgrade to v7.12.0, enter:

    DELETE /.kibana_7.12.0_*,.kibana_task_manager_7.12.0_*
  4. Inspect the output of GET /_cat/aliases.

    If the .kibana or .kibana_task_manager aliases are missing, you must create them manually. Find the latest index from the output of GET /_cat/indices and create the missing alias to point to the latest index. For example, if the .kibana alias is missing, and the latest index is .kibana_3, create a new alias using:

    POST /.kibana_3/_aliases/.kibana
  5. To remove the write block from the roll back indices, enter:

    PUT /.kibana,.kibana_task_manager/_settings {"index.blocks.write": false}
  6. Start Kibana on the older version you want to roll back to.