I have a big MongoDB database on my production server, which I want to set up as a replica set. I understand that if I enable the replica set option on both servers, it will automatically start to sync the data from scratch. But I don't want to sync from the beginning; instead I want to configure it like MySQL replication.
I would like to follow the following process:
- Take dump from primary
- Restore it on secondary
- Enable replica set in config file, on both servers
- Restart MongoDB.
- Go to primary server and add the secondary node.
Is this possible; or is there any other alternate solution for this?