# How can I move/migrate part of my data to a new cluster?

**URL:** https://discuss.elastic.co/t/how-can-i-move-migrate-part-of-my-data-to-a-new-cluster/305289
**Category:** Elasticsearch
**Created:** [May 20, 2022, 12:18pm UTC](https://discuss.elastic.co/t/how-can-i-move-migrate-part-of-my-data-to-a-new-cluster/305289 "2022-05-20T12:18:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Mary2022](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@Mary2022](https://discuss.elastic.co/u/Mary2022)
#### Post date: [May 20, 2022, 12:18pm UTC](https://discuss.elastic.co/t/how-can-i-move-migrate-part-of-my-data-to-a-new-cluster/305289/1 "2022-05-20T12:18:05Z")

</div>

Hi,

I have an ES cluster that runs on version 6.8.23 and I have a new cluster that runs version 7.17.1. I want to migrate data not older than 1 year to my new cluster. Is this possible? How can I do it?

---

<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: [May 20, 2022, 1:56pm UTC](https://discuss.elastic.co/t/how-can-i-move-migrate-part-of-my-data-to-a-new-cluster/305289/2 "2022-05-20T13:56:16Z")

</div>

If you have a timestamp in your index names, you can snapshot only the right indices and restore them in the new cluster.

If not, and if you have a timestamp in your documents, you can use the reindex from remote API with a query.

---

<div class="post-metadata">

### Author: ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)
#### Post date: [May 20, 2022, 10:18pm UTC](https://discuss.elastic.co/t/how-can-i-move-migrate-part-of-my-data-to-a-new-cluster/305289/3 "2022-05-20T22:18:41Z")

</div>

there is another method you can use is run logstash  
input = Elasticsearch (old)  
output = Elasticsearch(new)

I did this in past, don't remember what was the reason. but it works.

---

<div class="post-metadata">

### Author: ![Mary2022](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@Mary2022](https://discuss.elastic.co/u/Mary2022)
#### Post date: [June 2, 2022, 9:48pm UTC](https://discuss.elastic.co/t/how-can-i-move-migrate-part-of-my-data-to-a-new-cluster/305289/4 "2022-06-02T21:48:32Z")

</div>

How can I take a snapshot of my index using the time stamp?

I copied (export) the objects (dashboard, index patterns, etc) from the old cluster to the new cluster but not the indices. We are going to use the same pipelines too but I dont have the indices and I dont know how to do copy the mapping. I just need a small snapshot of the indices ( crossing fingers).

---

<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: [June 6, 2022, 2:59pm UTC](https://discuss.elastic.co/t/how-can-i-move-migrate-part-of-my-data-to-a-new-cluster/305289/5 "2022-06-06T14:59:03Z")

</div>

> [@Mary2022](#):
>
> How can I take a snapshot of my index using the time stamp?

If the index name contains a date, you can run something like:

```auto
PUT /_snapshot/my_repository/snapshot_2?wait_for_completion=true
{
  "indices": "index-date1,index-date2",
  "include_global_state": false
}

```

See [Create snapshot API | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/create-snapshot-api.html)

---

<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 4, 2022, 3:00pm UTC](https://discuss.elastic.co/t/how-can-i-move-migrate-part-of-my-data-to-a-new-cluster/305289/6 "2022-07-04T15:00:03Z")

</div>

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