# Exit after logstash finish to upload all data

**URL:** <https://discuss.elastic.co/t/exit-after-logstash-finish-to-upload-all-data/41860>\
**Category:** Logstash\
**Created:** [February 16, 2016, 9:16am UTC](https://discuss.elastic.co/t/exit-after-logstash-finish-to-upload-all-data/41860 "2016-02-16T09:16:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenbe2204](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chenbe2204](https://discuss.elastic.co/u/chenbe2204)\
**Post date:** [February 16, 2016, 9:16am UTC](https://discuss.elastic.co/t/exit-after-logstash-finish-to-upload-all-data/41860/1 "2016-02-16T09:16:36Z")

</div>

Hi ,

When I'm using this command to upload data to ElasticSearch from Logstash , I'm using this command:  
bin/logstash -f logstash.conf\_test1  
If I want to return to the prompt , I need to press CTRL+C.  
Can I run the data upload and return to the prompt after the upload is done without pressing CTRL+C ?

BR,  
Chen

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 16, 2016, 9:43am UTC](https://discuss.elastic.co/t/exit-after-logstash-finish-to-upload-all-data/41860/2 "2016-02-16T09:43:16Z")

</div>

You have a few options:

- Write a script that monitors the sincedb file and shuts down Logstash when the file has been processed according to sincedb.
- Use the stdin input (but then you won't be able to resume if Logstash aborts).
- Wait for the file input to get this feature. There's a GitHub issue for it.

---

<div class="post-metadata">

**Author:** ![chenbe2204](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chenbe2204](https://discuss.elastic.co/u/chenbe2204)\
**Post date:** [February 16, 2016, 12:20pm UTC](https://discuss.elastic.co/t/exit-after-logstash-finish-to-upload-all-data/41860/3 "2016-02-16T12:20:06Z")

</div>

Thanks 🙂

---

<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:11am UTC](https://discuss.elastic.co/t/exit-after-logstash-finish-to-upload-all-data/41860/4 "2017-07-06T05:11:12Z")

</div>


