# Force logstash to reindex a CSV

**URL:** https://discuss.elastic.co/t/force-logstash-to-reindex-a-csv/239003
**Category:** Logstash
**Created:** [June 28, 2020, 11:30am UTC](https://discuss.elastic.co/t/force-logstash-to-reindex-a-csv/239003 "2020-06-28T11:30:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)
#### Post date: [June 28, 2020, 11:30am UTC](https://discuss.elastic.co/t/force-logstash-to-reindex-a-csv/239003/1 "2020-06-28T11:30:02Z")

</div>

Hello,  
Sometimes I need to force the re-indexing of files csv from the beginning.  
my config logstash is

```
input {
file {
path => "/data/volumes/monitoring/logstash/dernier_passage/stocks.csv"
sincedb_path => "/dev/null"
start_position => "beginning"
}
}

```

What is the solution to reindex all files with logstash ?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [June 28, 2020, 12:28pm UTC](https://discuss.elastic.co/t/force-logstash-to-reindex-a-csv/239003/2 "2020-06-28T12:28:34Z")

</div>

That should work I guess.

---

<div class="post-metadata">

### Author: ![Youssef\_SBAI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youssef_sbai/32/64242_2.png) [@Youssef\_SBAI](https://discuss.elastic.co/u/Youssef_SBAI)
#### Post date: [June 28, 2020, 12:52pm UTC](https://discuss.elastic.co/t/force-logstash-to-reindex-a-csv/239003/3 "2020-06-28T12:52:57Z")

</div>

but if the CSV not switch do not work

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [June 28, 2020, 3:46pm UTC](https://discuss.elastic.co/t/force-logstash-to-reindex-a-csv/239003/4 "2020-06-28T15:46:52Z")

</div>

> [@Youssef\_SBAI](#):
>
> `sincedb_path => "/dev/null"`

This prevents the in-memory sincedb being persisted across restarts, but if you replace the file without restarting logstash then logstash will remember that it has read the file.

If you restart logstash it should re-read the file.

---

<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: [July 26, 2020, 3:46pm UTC](https://discuss.elastic.co/t/force-logstash-to-reindex-a-csv/239003/5 "2020-07-26T15:46:53Z")

</div>

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