# How work 's3 output plugin' to segment files in parts?

**URL:** <https://discuss.elastic.co/t/how-work-s3-output-plugin-to-segment-files-in-parts/96252>\
**Category:** Logstash\
**Created:** [August 8, 2017, 11:08am UTC](https://discuss.elastic.co/t/how-work-s3-output-plugin-to-segment-files-in-parts/96252 "2017-08-08T11:08:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JaviiPG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javiipg/32/20911_2.png) [@JaviiPG](https://discuss.elastic.co/u/JaviiPG)\
**Post date:** [August 8, 2017, 11:08am UTC](https://discuss.elastic.co/t/how-work-s3-output-plugin-to-segment-files-in-parts/96252/1 "2017-08-08T11:08:48Z")

</div>

Hi everyone,

I have an ELK environment installed. One of the client requirements is to have a backup of the records. For this reason I created a bucket S3 and I'm using a 'logstash-output-s3' plugin.

At the moment I have already configured the whole environment and it is working correctly. However I have some doubts seeing files uploaded to S3 bucket. I have the follow 'logstash-output-s3' plugin conf:

s3{  
region =\> "us-east-1"  
bucket =\> "spelkbucket"  
codec =\> "line"  
time\_file =\> 1  
}

I'm adding a 1log/minute. And each minute is uploaded one file with a incremental part. However this file aren't \> default 'size-file' (5242880 bytes) .

I have been write a 1log/minute. This is my data into S3 Bucket:

**Name File:** ls.s3.904a7212-6750-4ec2-8442-982a48d02aa3.2017-08-08T06.47.part0.txt  
**Date:** Aug 8\*\*, 2017 12:48:52 PM GMT+020

**Name File:** ls.s3.550b7426-483f-4b37-b4a8-eacf83223d0a.2017-08-08T06.48.part1.txt  
**Date:** Aug 8, 2017 12:50:00 PM GMT+0200

**Name File:** ls.s3.67ec0fbc-5c9c-456c-a22c-e39bf8842261.2017-08-08T06.49.part2.txt  
**Date:** Aug 8, 2017 12:51:05 PM GMT+0200

Why logstash is segment files in parts?? The files aren't \> 'size\_file'. [In documentation](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-s3.html#plugins-outputs-s3) say the follow:

> **part0** --\> this means if you indicate size\_file then it will generate more parts if you file.size \> size\_file. When a file is full it will be pushed to the bucket and then deleted from the temporary directory. If a file is empty, it is simply deleted. Empty files will not be pushed

Other question about the 'time\_file' setting. Do it is the time wait to uploaded tmp files to S3?

Thanks a lot!

Best regards,  
Javier

---

<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:** [September 5, 2017, 11:08am UTC](https://discuss.elastic.co/t/how-work-s3-output-plugin-to-segment-files-in-parts/96252/2 "2017-09-05T11:08:58Z")

</div>

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