# Copy live data between clusters

**URL:** <https://discuss.elastic.co/t/copy-live-data-between-clusters/234083>\
**Category:** Elasticsearch\
**Created:** [May 25, 2020, 6:21am UTC](https://discuss.elastic.co/t/copy-live-data-between-clusters/234083 "2020-05-25T06:21:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [May 25, 2020, 6:21am UTC](https://discuss.elastic.co/t/copy-live-data-between-clusters/234083/1 "2020-05-25T06:21:21Z")

</div>

Hi,  
I would like to copy indices/data between 2 clusters.  
For example, copy every 1/2/15 minutes the data from the index in cluster1 to cluster2.  
I would like the data to be live or near live in cluster2.  
So if a document is created now in cluster1, I would like to see it in cluster2 immediately, or within a couple of minutes.  
What is the best approach?  
Is using the the [search API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html) best solution?  
e.g.

```auto
GET /<index>/_search

```

Also, how can I validate I am not querying duplicate documents?  
Maybe something like saving the last timestamp queried and use it in the next query?!

Thanks!

---

<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:** [May 25, 2020, 7:43am UTC](https://discuss.elastic.co/t/copy-live-data-between-clusters/234083/2 "2020-05-25T07:43:29Z")

</div>

Have you seen [https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-ccr.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-ccr.html)?

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [June 1, 2020, 4:53am UTC](https://discuss.elastic.co/t/copy-live-data-between-clusters/234083/3 "2020-06-01T04:53:01Z")

</div>

Thank you!  
I was not aware of this functionality.  
I will go over the documentation.

---

<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:** [June 29, 2020, 4:53am UTC](https://discuss.elastic.co/t/copy-live-data-between-clusters/234083/4 "2020-06-29T04:53:02Z")

</div>

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