# Logstash\_jdbc\_last\_run file is not created

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-last-run-file-is-not-created/240882>\
**Category:** Logstash\
**Created:** [July 13, 2020, 2:11am UTC](https://discuss.elastic.co/t/logstash-jdbc-last-run-file-is-not-created/240882 "2020-07-13T02:11:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohoroyoi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ohoroyoi/32/46820_2.png) [@ohoroyoi](https://discuss.elastic.co/u/ohoroyoi)\
**Post date:** [July 13, 2020, 2:11am UTC](https://discuss.elastic.co/t/logstash-jdbc-last-run-file-is-not-created/240882/1 "2020-07-13T02:11:50Z")

</div>

`./logstash -V`  
`6.8.8`

The `logstash_jdbc_last_run` file is not created. It was created at first, but I deleted it.

Then, when I run it with a arbitrary file in another location, sql\_last\_value is not created.

And the file continues to be deleted. I made it, but it keeps deleting. Maybe logstash clears it.

how can I create `logstash_jdbc_last_run` again?

```auto
jdbc {
   jdbc_connection_string => "jdbc:postgresql://host:port/dbname?useTimezone=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useUnicode=true&characterEncoding=utf8"
  jdbc_user => user
  jdbc_password => pw
  jdbc_driver_library => "my arbitrary path"
  jdbc_driver_class => "org.postgresql.Driver"
  schedule => "* * * * *"
  statement => "SELECT region_id, region_type, country_code, country_code_3, continent_code, source_from, st_asgeojson(center_geo_point)::text as center_geo_point_text, center_longitude, jsonn::text from expedia_region_union where source_time - interval '9 hours' > :sql_last_value"
tags => ["expeia_region_union"]
tracking_column => "source_timestamp"
tracking_column_type => "timestamp"
use_column_value => true
clean_run => false
last_run_metadata_path => "/usr/share/logstash/.logstash_jdbc_last_run"
}

```

Once erased, can't you make it the same name again? Files created with other names are also deleted when you run logstash. For reference, I gave logstash permission as chown.

---

<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 10, 2020, 2:11am UTC](https://discuss.elastic.co/t/logstash-jdbc-last-run-file-is-not-created/240882/2 "2020-08-10T02:11:50Z")

</div>

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