# Can I create Sincedb file on daily basis?

**URL:** <https://discuss.elastic.co/t/can-i-create-sincedb-file-on-daily-basis/43831>\
**Category:** Logstash\
**Created:** [March 8, 2016, 8:26pm UTC](https://discuss.elastic.co/t/can-i-create-sincedb-file-on-daily-basis/43831 "2016-03-08T20:26:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [March 8, 2016, 8:26pm UTC](https://discuss.elastic.co/t/can-i-create-sincedb-file-on-daily-basis/43831/1 "2016-03-08T20:26:36Z")

</div>

Hi Experts,

I want to create sincedb file on daily basis from LS1.5.4 . Actually this will help me to re-index today's data only as I am creating index on daily basis. So my plan is to delete today's sincedb file and re-index the data. Hope i am clear with my point .For now my LS config file is like

```
input {   
          file { 
    		  type => "abc"
             path => "E:/CEF/latest/*"  
    	      start_position => "beginning" 
    		  sincedb_path => "E:/db/test" 
		  
 } 
}
filter{
.....
.....}
output {   
if [type] == "abc" {
		elasticsearch { 
		protocol => "http"
        action => "index" 
        host => "localhost" 
        index => "test-%{[@metadata][now]}" 
		workers => 3  
					}   
				}
}

```

So I want something like **sincedb\_path =\> "E:/db/test\_currentdate"**

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [March 8, 2016, 8:55pm UTC](https://discuss.elastic.co/t/can-i-create-sincedb-file-on-daily-basis/43831/2 "2016-03-08T20:55:12Z")

</div>

Let me ask this way , lets say I have 3 log files in a folder which are created on different dates . Something like  
abc\_01-03-2016  
bc\_02-03-2016  
cd\_03-03-2016

Now with the above LS config files all will be parsed and data will be saved in a single current date index . Also sincedb holds the pointer to the last line of cd\_03-03-2016 file . My requirement is to only re-index bc\_02-03-2016 data . If i delete complete sincedb file it will reindex whole data from the beginning and that does not solve my purpose . The question would be how to reindex a single file from bunch of files?

---

<div class="post-metadata">

**Author:** ![yahoo](https://avatars.discourse-cdn.com/v4/letter/y/898d66/32.png) [@yahoo](https://discuss.elastic.co/u/yahoo)\
**Post date:** [March 24, 2016, 8:13pm UTC](https://discuss.elastic.co/t/can-i-create-sincedb-file-on-daily-basis/43831/3 "2016-03-24T20:13:35Z")

</div>

Hi @vikas_gopal  
I have same problem.  
Did you figure out how to solve it ?

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [March 27, 2016, 2:08pm UTC](https://discuss.elastic.co/t/can-i-create-sincedb-file-on-daily-basis/43831/4 "2016-03-27T14:08:54Z")

</div>

@yahoo No !! for now I am only opting reindexing . I know this is painful but I do not get any answer to my query .I am sure many folks will have same question and may be they achieved it . I am still waiting ☹

---

<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:** [March 27, 2016, 2:33pm UTC](https://discuss.elastic.co/t/can-i-create-sincedb-file-on-daily-basis/43831/5 "2016-03-27T14:33:05Z")

</div>

Can't you just start up another Logstash instance with a different sincedb path where the input just specifies the file you want to reindex, and not the whole directory?

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [March 28, 2016, 7:28am UTC](https://discuss.elastic.co/t/can-i-create-sincedb-file-on-daily-basis/43831/6 "2016-03-28T07:28:26Z")

</div>

@Christian_Dahlqvist,

Thanks for the response , this is exactly what I am doing to get reindex specific file data , things will be more easy for me if I have sincedb on daily basis.

---

<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 6, 2017, 5:05am UTC](https://discuss.elastic.co/t/can-i-create-sincedb-file-on-daily-basis/43831/7 "2017-07-06T05:05:13Z")

</div>

Closed on July 6, 2017, 5:05am UTC


