# Not able to use since\_db properly

**URL:** <https://discuss.elastic.co/t/not-able-to-use-since-db-properly/188530>\
**Category:** Logstash\
**Created:** [July 2, 2019, 2:17pm UTC](https://discuss.elastic.co/t/not-able-to-use-since-db-properly/188530 "2019-07-02T14:17:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pranay\_Garg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pranay_garg/32/49232_2.png) [@Pranay\_Garg](https://discuss.elastic.co/u/Pranay_Garg)\
**Post date:** [July 2, 2019, 2:17pm UTC](https://discuss.elastic.co/t/not-able-to-use-since-db-properly/188530/1 "2019-07-02T14:17:00Z")

</div>

I am trying to insert data in elasticsearch using logstash but when i update a file and again process it the events get duplicated when i only want the newly added entries to get indexed, for this i am trying to use sincedb\_path but i am making some mistake. Can anybody help me in finding the mistake?. Any help is appreciated. Thanks  
My input filter looks like this:

```
input{
file
{
	mode => "read"
	file_completed_action => "log"
	file_completed_log_path => "C:/logstash-7.1.1/log.txt"
	path => "F:/PRANAY/project/Store Mg C++/sales.csv"
	sincedb_path => "F:/PRANAY/project/Store Mg C++/salesincedb.txt"
	start_position => "beginning"
}}

```

It would be really great if someone could explain when to use start\_position and mode and which value to use.

---

<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:** [July 2, 2019, 3:13pm UTC](https://discuss.elastic.co/t/not-able-to-use-since-db-properly/188530/2 "2019-07-02T15:13:02Z")

</div>

> [@Pranay\_Garg](#):
>
> when i update a file and again process it the events get duplicated

How are you updating the file? The file input tracks files by their file id (similar to an inode number on UNIX), not by their name. If you create a new file with the same name but a different id the file input will see it as a new 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 30, 2019, 3:13pm UTC](https://discuss.elastic.co/t/not-able-to-use-since-db-properly/188530/3 "2019-07-30T15:13:04Z")

</div>

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