# Avoid to lose data with full restart cluster

**URL:** <https://discuss.elastic.co/t/avoid-to-lose-data-with-full-restart-cluster/192522>\
**Category:** Elasticsearch\
**Created:** [July 27, 2019, 12:26pm UTC](https://discuss.elastic.co/t/avoid-to-lose-data-with-full-restart-cluster/192522 "2019-07-27T12:26:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elk2](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@elk2](https://discuss.elastic.co/u/elk2)\
**Post date:** [July 27, 2019, 12:26pm UTC](https://discuss.elastic.co/t/avoid-to-lose-data-with-full-restart-cluster/192522/1 "2019-07-27T12:26:15Z")

</div>

When a full restart cluster is needed, what is the best solution to avoid to lose data?  
For example , if many server send syslog to logstash and logstash sends logs to elasticsearch, when I restart elasticsearch I lose data?

---

<div class="post-metadata">

**Author:** ![Antoine.E](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antoine.e/32/41348_2.png) [@Antoine.E](https://discuss.elastic.co/u/Antoine.E)\
**Post date:** [July 27, 2019, 1:58pm UTC](https://discuss.elastic.co/t/avoid-to-lose-data-with-full-restart-cluster/192522/2 "2019-07-27T13:58:15Z")

</div>

Personnaly I use a rsyslog before my logstash server and then ship the logs with either the file input from logstash or filebeat.

This syslog server can be used as a buffer for example if you have to reboot your logstash instance.

I would recommend to delete the log file from the server after it has been ingested by logstash.

Another option that I saw would be to use Redis but I don't know about this setup as I never used it.

You can also find a lot of example configuration on the net for this setup as is it pretty common and I would assume the best practice.

---

<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:** [August 24, 2019, 1:58pm UTC](https://discuss.elastic.co/t/avoid-to-lose-data-with-full-restart-cluster/192522/3 "2019-08-24T13:58:16Z")

</div>

Closed on August 24, 2019, 1:58pm UTC

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