# How to ingest old logs into slow storage and newer logs into fast storage

**URL:** <https://discuss.elastic.co/t/how-to-ingest-old-logs-into-slow-storage-and-newer-logs-into-fast-storage/247009>\
**Category:** Elasticsearch\
**Created:** [August 31, 2020, 8:12pm UTC](https://discuss.elastic.co/t/how-to-ingest-old-logs-into-slow-storage-and-newer-logs-into-fast-storage/247009 "2020-08-31T20:12:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ManjaroBlack](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@ManjaroBlack](https://discuss.elastic.co/u/ManjaroBlack)\
**Post date:** [August 31, 2020, 8:12pm UTC](https://discuss.elastic.co/t/how-to-ingest-old-logs-into-slow-storage-and-newer-logs-into-fast-storage/247009/1 "2020-08-31T20:12:45Z")

</div>

I am experimenting with the Elastic Stack on my laptop. I need to ingest a bunch of logs dating back a few years up to current time. I am using logstash to process the logs and send them to elasticsearch. I have limited space on my SSD but plenty of space on my HDD.

I would like to ingest the logs and allocate the indexes to either the SSD or HDD based on the timestamp of the logs, f.ex, if the logs are 2 weeks old or newer, they go to the SSD and if they are 2 weeks old or older, they go to the HDD. Is this possible?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 31, 2020, 9:33pm UTC](https://discuss.elastic.co/t/how-to-ingest-old-logs-into-slow-storage-and-newer-logs-into-fast-storage/247009/2 "2020-08-31T21:33:57Z")

</div>

It is, check out [https://www.elastic.co/guide/en/elasticsearch/reference/current/shard-allocation-filtering.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/shard-allocation-filtering.html)

---

<div class="post-metadata">

**Author:** ![ManjaroBlack](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@ManjaroBlack](https://discuss.elastic.co/u/ManjaroBlack)\
**Post date:** [September 1, 2020, 2:49pm UTC](https://discuss.elastic.co/t/how-to-ingest-old-logs-into-slow-storage-and-newer-logs-into-fast-storage/247009/3 "2020-09-01T14:49:43Z")

</div>

Thank you for your help.

Is this a setting that can be set at the time of index creation in logstash? Or does this have to be done manually after index creation?

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [September 1, 2020, 3:19pm UTC](https://discuss.elastic.co/t/how-to-ingest-old-logs-into-slow-storage-and-newer-logs-into-fast-storage/247009/4 "2020-09-01T15:19:47Z")

</div>

You will need to have at laest 2 nodes,  
1 node that will use SSD Storage and will be the hot node that receive the newest logs  
1 node that will use HDD storage and will be the warm node that receive the old logs

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 1, 2020, 8:23pm UTC](https://discuss.elastic.co/t/how-to-ingest-old-logs-into-slow-storage-and-newer-logs-into-fast-storage/247009/5 "2020-09-01T20:23:16Z")

</div>

You can do it ahead of time using index templates.

---

<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 29, 2020, 8:23pm UTC](https://discuss.elastic.co/t/how-to-ingest-old-logs-into-slow-storage-and-newer-logs-into-fast-storage/247009/6 "2020-09-29T20:23:24Z")

</div>

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