Restore production data in to Test database for testing

Hi Team,

Am very new to MongoDB, pardon me for incorrect technical terms used.

We have 2 replica set in our environment and each replica set has 3 nodes, 1 RS for Prod and another RS for testing.

We want to migrate the data from production in to the test environment and once the testing is done we need to revert the testing data back in the testing environment.

How can we achieve this ? IF there is an existing document to refer please redirect us.
Thanks for your support.

History:

We took the complete data folder from one of the production node and moved it under the primary node of test environment. which resulted in complete change of replica set itself in test. We then had to reconfigure the complete replica set by renaming each node to the correct server name. Is this correct process ?

I give you 5/5 so far :slight_smile:

Almost the correct procedure.
Start the nodes without the replicaset enabled and clear out the replica set data.
Then initialise a new replicaset.

The full procedure is Restore a Replica Set from MongoDB Backups