# Add An archived Flat File

**URL:** <https://discuss.elastic.co/t/add-an-archived-flat-file/166603>\
**Category:** Elasticsearch\
**Created:** [January 31, 2019, 4:05pm UTC](https://discuss.elastic.co/t/add-an-archived-flat-file/166603 "2019-01-31T16:05:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![macdadi112](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@macdadi112](https://discuss.elastic.co/u/macdadi112)\
**Post date:** [January 31, 2019, 4:05pm UTC](https://discuss.elastic.co/t/add-an-archived-flat-file/166603/1 "2019-01-31T16:05:49Z")

</div>

Hi

Is there a way in which to view archived files in elastic search from a month ago?

Thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 31, 2019, 4:28pm UTC](https://discuss.elastic.co/t/add-an-archived-flat-file/166603/2 "2019-01-31T16:28:32Z")

</div>

How did you archive them?

---

<div class="post-metadata">

**Author:** ![macdadi112](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@macdadi112](https://discuss.elastic.co/u/macdadi112)\
**Post date:** [January 31, 2019, 5:00pm UTC](https://discuss.elastic.co/t/add-an-archived-flat-file/166603/3 "2019-01-31T17:00:22Z")

</div>

They were archived after 2 weeks and involves minio.

So what I want to do is be able to replay them as and when I want.

Thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 31, 2019, 5:12pm UTC](https://discuss.elastic.co/t/add-an-archived-flat-file/166603/4 "2019-01-31T17:12:38Z")

</div>

Sounds like similar to:

> [@Archived minio files](https://discuss.elastic.co/t/archived-minio-files/166561):
>
> Hi What I have is files get archived to minio after a certain duration. So how would I play these files again? Thanks and apologies if I sent this to the wrong group, Mac

> [@Replay files from Minio](https://discuss.elastic.co/t/replay-files-from-minio/166545):
>
> Hi What I have is files get archived to minio after a certain duration. So how would I play these files again (retrieved by logstash)? Thanks and apologies if I sent this to the wrong group, Mac

Right?

---

<div class="post-metadata">

**Author:** ![macdadi112](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@macdadi112](https://discuss.elastic.co/u/macdadi112)\
**Post date:** [January 31, 2019, 7:48pm UTC](https://discuss.elastic.co/t/add-an-archived-flat-file/166603/5 "2019-01-31T19:48:44Z")

</div>

Yes, thats the same issue but started this one after thinking about what I was trying to achieve.

It could be replayed in Logstash -\> elasticsearch

Or as suggested above directly in elasticsearch.

Apologies if I shouldn't have duplicated the issue.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 31, 2019, 8:10pm UTC](https://discuss.elastic.co/t/add-an-archived-flat-file/166603/6 "2019-01-31T20:10:15Z")

</div>

How was the data archived in Minio?

---

<div class="post-metadata">

**Author:** ![macdadi112](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@macdadi112](https://discuss.elastic.co/u/macdadi112)\
**Post date:** [February 1, 2019, 9:09am UTC](https://discuss.elastic.co/t/add-an-archived-flat-file/166603/7 "2019-02-01T09:09:24Z")

</div>

It was archived using minio running via docker.

It is a flat file and is json format once you look at it.

Please note that logstash is running as a container via docker.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 1, 2019, 9:22am UTC](https://discuss.elastic.co/t/add-an-archived-flat-file/166603/8 "2019-02-01T09:22:42Z")

</div>

I don't understand so I don't know.  
You did not share what exactly has been stored in Minio. What the files look like...

May be have a look at the s3 input plugin of logstash.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 1, 2019, 10:43am UTC](https://discuss.elastic.co/t/add-an-archived-flat-file/166603/10 "2019-02-01T10:43:24Z")

</div>

So I believe you can use filebeat to stream all lines and use the json option. See [https://www.elastic.co/guide/en/beats/filebeat/master/filebeat-input-log.html#filebeat-input-log-config-json](https://www.elastic.co/guide/en/beats/filebeat/master/filebeat-input-log.html#filebeat-input-log-config-json)

If you have any further question on this, please open a new question in #beats:filebeat

---

<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:** [March 1, 2019, 10:43am UTC](https://discuss.elastic.co/t/add-an-archived-flat-file/166603/11 "2019-03-01T10:43:25Z")

</div>

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