Hi there!
I have two questions about backup and restore sharded cluster:
I have replicaset. Replicaset comprises primary, secondary and arbiter.
I create a new sharded cluster and i want to move data from the replicaset to the sharded cluster.
How can i do it? Maybe there are best practices for this?
What is the best way for backup and restore sharded cluster without using MongoDB Atlas, MongoDB Cloud Manager, MongoDB Ops Manager?
Hi,
Are you going to move a ReplicaSet to a new Shared Cluster?
You can transfer your Replica set to a new cluster: Replica Set to Replica Set (backup/restore or extend your old RS cluster by nodes from a new cluster, sync the data, switch primary to the new cluster, remove old RS members ), at the end you can convert it to a sharded cluster. Convert a Replica Set to a Sharded Cluster
regarding the best way to backup and restore sharded cluster without using MongoDB Atlas, MongoDB Cloud Manager, or Ops Manager - you can use LVM snapshots, please read: Backup and Restore Sharded Clusters
Thank you for your answer!
I want to exactly move the data from the replicaset to the new sharded cluster
expected result:
i want to have a replicaset and a sharded cluster with same data
In the beginning, I would create a new cluster as a Replica Set, move data from the old RS to the new RS (see my first post) and convert new RS to a shared cluster Convert a Replica Set to a Sharded Cluster
In MongoDB 4.2+, you cannot use file system snapshots for backups that involve transactions across shards because those backups do not maintain atomicity. Instead, use one of the following to perform the backups: