We are using 3 cluster Monggo DB.
I have stopped mongo service in primary and one replica set. Another replica set member we changed to stand alone by changing mongod.conf file. Removed replication and authentication key.
Now data is inserted into stand-alone Mongo. Again started Mongo primary and other two replica set.
Now the new data is not replicated in Mongo Primary and replica set.
Please suggest, is there a way to replicate data from a replica set member. Tried syncFrom() but no luck.
Any modifications in standalone mode are not written to the replica set oplog, so directly inserting or updating new data will introduce inconsistency in this replica set member. This data inconsistency is likely to cause replica set members to crash in future when an oplog change applies fine on another replica set member but cannot be applied to this member (or vice-versa).
The inconsistent secondary should be fully re-synced before rejoining the replica set. If you have some way of identifying the documents that have been inserted or updated, you could dump & restore those into the current primary before re-syncing.
If you need to take a majority of your replica set offline for some reason in future, you should reconfigure the remaining member(s) as a smaller replica set rather than writing to a former replica set member in standalone mode. Alternatively, you could drop the local
database (in standalone mode) and convert this standalone to a new replica set.