# Elasticsearch rolling restart without indexing down time

**URL:** <https://discuss.elastic.co/t/elasticsearch-rolling-restart-without-indexing-down-time/326358>\
**Category:** Elasticsearch\
**Created:** [February 23, 2023, 6:03pm UTC](https://discuss.elastic.co/t/elasticsearch-rolling-restart-without-indexing-down-time/326358 "2023-02-23T18:03:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [February 23, 2023, 6:03pm UTC](https://discuss.elastic.co/t/elasticsearch-rolling-restart-without-indexing-down-time/326358/1 "2023-02-23T18:03:53Z")

</div>

We run an elasticsearch cluster 7.17, with 3 data nodes and 3 master nodes. The use case is for monitoring with elasticAPM.

We follow official documentation at [Full cluster restart upgrade | Elasticsearch Guide [7.17] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/restart-upgrade.html) to update our elaticsearch cluster.

It works fine, but at the end, we have found data miss on apm indices!

In the documentation, you say to disable allocation before removing the node, hence there is no primary shard, hence APM cannot write data.

So, is there a good practice to update a cluster without data loss? Without changing architecture of course (no queue between APM and elasticsearch).

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [February 23, 2023, 6:23pm UTC](https://discuss.elastic.co/t/elasticsearch-rolling-restart-without-indexing-down-time/326358/2 "2023-02-23T18:23:24Z")

</div>

Are you sure you are not referring to [the rolling upgrade instructions](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/rolling-upgrades.html)? The full cluster restart would result in the cluster being unavailable for some period of time.

Do you have replica shards configured or are you running with only primary shards?

---

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [February 23, 2023, 6:50pm UTC](https://discuss.elastic.co/t/elasticsearch-rolling-restart-without-indexing-down-time/326358/3 "2023-02-23T18:50:06Z")

</div>

well about replica, I try to understand, the 1st instruction is to ... disable replication, right ?

```auto
PUT _cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.enable": "primaries"
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 23, 2023, 6:50pm UTC](https://discuss.elastic.co/t/elasticsearch-rolling-restart-without-indexing-down-time/326358/4 "2023-03-23T18:50:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
