Search code examples
mongodbreplicationmongodb-replica-set

Start mongod with overrided configuration for replSet


I have few mongoDB instances running as replication set. For each of them, I have prepared configuration file with replSetName, so starting mongo by mongod without -replSet is still adding it to replication set. But, to maintenance instance, I need to run it with replSet disabled - is it possible to override replSetName from configuration by some mongod parameter (like mongod -port, which overrides port: from conf file)


Solution

  • Simple answer is no...

    When I need to start node to maintenance mode, I have "ready made string" on my "notepad++" what includes all needed parameters as command line parameters (of course different port number) to bring node up without --replSet..