# Find difference between two clusters

**URL:** <https://discuss.elastic.co/t/find-difference-between-two-clusters/217417>\
**Category:** Elasticsearch\
**Created:** [January 31, 2020, 3:58pm UTC](https://discuss.elastic.co/t/find-difference-between-two-clusters/217417 "2020-01-31T15:58:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brhardwick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brhardwick/32/47000_2.png) [@brhardwick](https://discuss.elastic.co/u/brhardwick)\
**Post date:** [January 31, 2020, 3:58pm UTC](https://discuss.elastic.co/t/find-difference-between-two-clusters/217417/1 "2020-01-31T15:58:05Z")

</div>

We have a use case that requires us to replace clusters regularly. My current approach is a Blue/Green-type deployment like the following:  
Cluster A is running,  
bring up Cluster B and wait for it to be live.  
Cluster A and B both have the same repository in S3, so snapshot Cluster A, then restore that snapshot in Cluster B.  
Update the DNS to point from Cluster A to Cluster B  
Delete Cluster A.

This works, but the problem is that data can be populating Cluster A while Cluster B's snapshot is being restored, so that when the DNS is updated, we lose that data.  
My question is, is there a query that i can run on each index that will find all the missing documents in Cluster B? Is there another way to make sure the clusters are identical?

P.S. I know that we can update the cluster by updating each node and migrating the shards away, but lets assume that this approach is off the table for now.

---

<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:** [February 28, 2020, 3:58pm UTC](https://discuss.elastic.co/t/find-difference-between-two-clusters/217417/2 "2020-02-28T15:58:09Z")

</div>

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