# S3 input plugin can't backup to same bucket using prefix

**URL:** <https://discuss.elastic.co/t/s3-input-plugin-cant-backup-to-same-bucket-using-prefix/69713>\
**Category:** Logstash\
**Created:** [December 21, 2016, 9:20pm UTC](https://discuss.elastic.co/t/s3-input-plugin-cant-backup-to-same-bucket-using-prefix/69713 "2016-12-21T21:20:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sura](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sura](https://discuss.elastic.co/u/sura)\
**Post date:** [December 21, 2016, 9:20pm UTC](https://discuss.elastic.co/t/s3-input-plugin-cant-backup-to-same-bucket-using-prefix/69713/1 "2016-12-21T21:20:28Z")

</div>

In the [s3 input plugin documentation](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-s3.html#plugins-inputs-s3-backup_add_prefix) , it says that it should be possible to backup to a different "folder" within the same bucket. This doesn't seem to work however. Any ideas?

My input config:

input {  
s3 {  
bucket =\> "some\_bucket"  
region =\> "us-east-1"  
prefix =\> "stage/data/2016/12/15"  
sincedb\_path =\> "/tmp/s3-sincedb"  
type =\> "s3"  
backup\_add\_prefix =\> "backup/"  
interval =\> 120  
delete =\> true  
}  
}

This deletes the objects that match the prefix, but doesn't backup.

(I did try using this backup prefix along with backing up to a different bucket, the "backup\_to\_bucket" option, but [ran into](https://github.com/elastic/logstash/issues/6201) other [issues there](https://github.com/aws/aws-sdk-ruby/issues/1091).)

---

<div class="post-metadata">

**Author:** ![sura](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sura](https://discuss.elastic.co/u/sura)\
**Post date:** [December 22, 2016, 3:08pm UTC](https://discuss.elastic.co/t/s3-input-plugin-cant-backup-to-same-bucket-using-prefix/69713/2 "2016-12-22T15:08:49Z")

</div>

Nobody? Any workarounds?

---

<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:** [January 19, 2017, 3:08pm UTC](https://discuss.elastic.co/t/s3-input-plugin-cant-backup-to-same-bucket-using-prefix/69713/3 "2017-01-19T15:08:53Z")

</div>

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