# Replace Old Data From Logstash

**URL:** https://discuss.elastic.co/t/replace-old-data-from-logstash/258538
**Category:** Logstash
**Created:** [December 14, 2020, 5:42am UTC](https://discuss.elastic.co/t/replace-old-data-from-logstash/258538 "2020-12-14T05:42:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rehannali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rehannali/32/57714_2.png) [@rehannali](https://discuss.elastic.co/u/rehannali)
#### Post date: [December 14, 2020, 5:42am UTC](https://discuss.elastic.co/t/replace-old-data-from-logstash/258538/1 "2020-12-14T05:42:16Z")

</div>

Hi, I using MySql to dumb data into elasticsearch. It runs every 5 mins and got duplicate results.  
I want to replace data so there will be no duplicate entries in it. How can i achieve this?

> P.S. I need to replace whole index not document itself.

---

<div class="post-metadata">

### Author: ![fadjar340](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fadjar340/32/43610_2.png) [@fadjar340](https://discuss.elastic.co/u/fadjar340)
#### Post date: [December 14, 2020, 8:36am UTC](https://discuss.elastic.co/t/replace-old-data-from-logstash/258538/2 "2020-12-14T08:36:30Z")

</div>

What is your query?  
I'm afraid that you didn't included the timefilter so you got the duplicate data...

---

<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: [January 11, 2021, 8:36am UTC](https://discuss.elastic.co/t/replace-old-data-from-logstash/258538/3 "2021-01-11T08:36:40Z")

</div>

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