# Migration between MongoDB clusters

**URL:** <https://forums.percona.com/t/migration-between-mongodb-clusters/30377>\
**Category:** Percona Operator for MongoDB\
**Tags:** percona, mongodb\
**Created:** [May 17, 2024, 9:34am UTC](https://forums.percona.com/t/migration-between-mongodb-clusters/30377 "2024-05-17T09:34:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexei\_Fokin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/alexei_fokin/32/13579_2.png) [@Alexei\_Fokin](https://forums.percona.com/u/Alexei_Fokin)\
**Post date:** [May 17, 2024, 9:34am UTC](https://forums.percona.com/t/migration-between-mongodb-clusters/30377/1 "2024-05-17T09:34:56Z")

</div>

## Description:

I have a MongoDB in a Kubernetes cluster managed by percona-operator. I would like to move it to another cluster. I have deployed a similar infrastructure in the new cluster and rolled up the data from the backup. But during this time in the working cluster, the data may have changed. What is the best way to synchronise it? Is it possible to specify the old cluster as a shard in the new cluster?

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [May 17, 2024, 12:18pm UTC](https://forums.percona.com/t/migration-between-mongodb-clusters/30377/2 "2024-05-17T12:18:12Z")

</div>

Hi Alexei, you can expose the nodes of both clusters outside k8s while setting the new cluster to unmanaged. Then add the new nodes and let them sync. The whole process is described in detail here: [Migrating MongoDB to Kubernetes](https://www.percona.com/blog/migrating-mongodb-to-kubernetes)

---

<div class="post-metadata">

**Author:** ![Alexei\_Fokin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/alexei_fokin/32/13579_2.png) [@Alexei\_Fokin](https://forums.percona.com/u/Alexei_Fokin)\
**Post date:** [May 18, 2024, 4:43pm UTC](https://forums.percona.com/t/migration-between-mongodb-clusters/30377/3 "2024-05-18T16:43:20Z")

</div>

Everything seems to be clear. But after creating a Novgorod cluster, replicas are constantly restarting due to certificate validation

```auto
Readiness probe failed: command "/opt/percona/mongodb-healthcheck k8s readiness --component mongos --ssl --sslInsecure --sslCAFile /etc/mongodb-ssl/ca.crt --sslPEMKeyFile /tmp/tls.pem" timed out

```
