top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Configure replication after restored the database in MongoDB?

0 votes
132 views

I have a biggest database in production server, I need to configure replication set for this, But I dont want to start it from initial sync. I need to configure it like Mysql replication.

The flow is,
Take dump from prod.
Restore it in Secondary.
Enable replication in config file.
Restart mongod services.rs.Initiate () from primaryrs.add("xxxxx")

But when I execute the rs.add command till start sync the database from the scratch. Is there any other possibilities to achieve this?

posted Feb 14, 2017 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

In my project we need the system to work sometimes as standalone DB without communication to else computers and sometimes in replication mode to reflect all the DB data to else computers. when we switch between options we restart all the system ans its considered as new activity with new tables. the decision if to use more computers (and than we need replication) is of the customer.

Im using ubuntu OS (linux) and I have a services to apply mongodb in every situation (replication / standalone).
my question is if in such case, can I use the same port/ DB folder/ logger of the mongodb for replication and standalone, and apply the services according to the customer decision or I must apply the mongodb in else port/ DB folder/ logger for replication and standalone modes to prevent problems?

+2 votes

Is there a way to configure/increase the memory limit(100MB) on the pipeline? What if I have a lot of RAM that can be used by MongoDB?

0 votes

I am a beginner at spark, and i need to use spark with mongodb as a data store for a project for the company i am interning at. I have setup spark as standalone and have setup mongodb on my windows machine, but i am not able to configure the spark-mongodb connector. Can someone please list the steps to do so?

I read the documentation on the official site but i am not able to figure it out.

...