I have 2 mongo cluster with 3 nodes and a replica set configurated. The goal is to import the database from clusterA to clusterB via a master snapshot.
Those are the steps that I followed.
No errors when restarting, but when I connect back to the database, I still see the old collections. However, the directory /data/db2 shows a different size and matches the database in clusterA.
Thank you, any help is appreciated.
Found the solution:
So, we have one mongo cluster clusterA, with 1 master and 2 workers.
In clusterA, we make a snapshot from master volume, snapA and we create a volume from that snapshot volumeA.
If we want to import mongo database from clusterA to clusterB:
Once the volume is attached and mounted, follow this Mongo guide https://docs.mongodb.com/manual/tutorial/restore-replica-set-from-backup/.
After that, you'll have successfully imported a mongo backup from clusterA to clusterB via volume snapshot.
Regards.