Upgrade ELK stack

What is the right way to perform an upgrade of the stack to preserve the data ..

I am trying to upgrade from 7.6 to 7.7.1

I am having challenges in upgrading without data loss.
I went through the documentation and its confusing.

I had a snapshot of my previous version. So do I do a restore after I upgrade?

1 Like

You just need to follow the instructions here: https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html

1 Like

I tried to do snapshot restore and then ended up closing all the indices. Now I cant reopen them as I am getting below error and I am stuck . Please advice on how to proceed

{"message":"closed: [index_closed_exception] closed, with { index_uuid="sTrUswmeTvOnvofMH1C9GA" & index=".kibana_1" }","statusCode":400,"error":"Bad Request"}

1 Like

Where did you see that in the documentation?

1 Like

What is the command you are using?

1 Like

So we have this step
5. [Back up your data by taking a snapshot!]
How do we put back the data we backed up. I believe that's a snapshot restore?

POST /_all/_open and I tried to open index individually also ..all leads to same error

It was not written to close the indices.

Not sure why you can't reopen the indices.

It was not letting me to go ahead with the restore unless I close or delete the index. But once I closed it I cannot perform any more operations. Could you pls pull any body else to this discussion who can address this?

Was that written that you have to restore?

No its not written there but after I did an upgrade I don't see my data in there ..So that's why I did a restore

I'm confused now.

What exactly did you do?

What is the output of:

GET /
GET /_cat/nodes?v
GET /_cat/health?v
GET /_cat/indices?v

If some outputs are too big, please share them on gist.github.com and link them here.

I am unabel to start Kibana now..error says
[index_closed_exception] closed, with { index_uuid="sTrUswmeTvOnvofMH1C9GA" & index=".kibana_1" } :: {"path":"/.kibana/_count","query":{},"body":"{\"query\":{\"bool\":{\"should\":[{\"bool\":{\"must\":[{\"exists\":{\"field\":\"graph-workspace\"}},{\"bool\":{\"must_not\":{\"term\":{\"migrationVersion.graph-workspace\":\"7.0.0\"}}}}]}},{\"bool\":{\"must\":[{\"exists\":{\"field\":\"space\"}},{\"bool\":{\"must_not\":{\"term\":{\"migrationVersion.space\":\"6.6.0\"}}}}]}},{\"bool\":{\"must\":[{\"exists\":{\"field\":\"map\"}},{\"bool\":{\"must_not\":{\"term\":{\"migrationVersion.map\":\"7.6.0\"}}}}]}},{\"bool\":{\"must\":[{\"exists\":{\"field\":\"canvas-workpad\"}},{\"bool\":{\"must_not\":{\"term\":{\"migrationVersion.canvas-workpad\":\"7.0.0\"}}}}]}},{\"bool\":{\"must\":[{\"exists\":{\"field\":\"task\"}},{\"bool\":{\"must_not\":{\"term\":{\"migrationVersion.task\":\"7.6.0\"}}}}]}},{\"bool\":{\"must\":[{\"exists\":{\"field\":\"index-pattern\"}},{\"bool\":{\"must_not\":{\"term\":{\"migrationVersion.index-pattern\":\"7.6.0\"}}}}]}},{\"bool\":{\"must\":[{\"exists\":{\"field\":\"visualization\"}},{\"bool\":{\"must_not\":{\"term\":{\"migrationVersion.visualization\":\"7.4.2\"}}}}]}},{\"bool\":{\"must\":[{\"exists\":{\"field\":\"dashboard\"}},{\"bool\":{\"must_not\":{\"term\":{\"migrationVersion.dashboard\":\"7.3.0\"}}}}]}},{\"bool\":{\"must\":[{\"exists\":{\"field\":\"search\"}},{\"bool\":{\"must_not\":{\"term\":{\"migrationVersion.search\":\"7.4.0\"}}}}]}}]}}}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"index_closed_exception\",\"reason\":\"closed\",\"index_uuid\":\"sTrUswmeTvOnvofMH1C9GA\",\"index\":\".kibana_1\"}],\"type\":\"index_closed_exception\",\"reason\":\"closed\",\"index_uuid\":\"sTrUswmeTvOnvofMH1C9GA\",\"index\":\".kibana_1\"},\"status\":400}"}

Run it with curl.

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

1 Like

No I am not able to even launch kibana . So I cannot access the dev tools section. Whatever I posted was not code .. its a snippet from logs. That was an error on kibana startup logs

[index_closed_exception] closed, with { index_uuid="sTrUswmeTvOnvofMH1C9GA" & index=".kibana_1" }

I upgraded my ELK from 7.1 to 7.7 by following the documentation. But where did my data from previous version go.

It does not prevent you from running the curl commands I asked you to run, does it?

I'm sorry but you did not follow the documentation as I said earlier. It was not written to close indices, restore snapshots...

Hard to know as we don't know exactly what you did. The exact steps.
Best chance is that data is still in the data dir.

curl worked thanks

So when we do an upgrade hoe can we move the data folder from older version to newer version? Just copy and paste the folder to new version .will that work?