MongoDB Documentation, Release 3.0.4 9.4 Replication Reference 9.4.1 Replication Methods in the mongo Shell 9.4.2 Replication Database Commands 9.4.3 Replica Set Reference Documentation Name Description rs.add() Adds a member to a replica set. rs.addArb() Adds an arbiter to a replica set. rs.conf() Returns the replica set configuration document. rs.freeze() Prevents the current member from seeking election as primary for a period of time. rs.help() Returns basic help text for replica set functions. rs.initiate() Initializes a new replica set. rs.printReplicationInfo() Prints a report of the status of the replica set from the perspective of the primary. rs.printSlaveReplicationInfo() Prints a report of the status of the replica set from the perspective of the secondaries. rs.reconfig() Re-configures a replica set by applying a new replica set configuration object. rs.remove() Remove a member from a replica set. rs.slaveOk() Sets the slaveOk property for the current connection. Deprecated. Use readPref() and Mongo.setReadPref() to set read preference . rs.status() Returns a document with information about the state of the replica set. rs.stepDown() Causes the current primary to become a secondary which forces an election . rs.syncFrom() Sets the member that this replica set member will sync from, overriding the default sync target selection logic. Name Description replSetFreeze Prevents the current member from seeking election as primary for a period of time. replSetGetStatus Returns a document that reports on the status of the replica set. replSetInitiate Initializes a new replica set. replSetMaintenance Enables or disables a maintenance mode, which puts a secondary node in a RECOVERING state. replSetReconfig Applies a new configuration to an existing replica set. replSetStepDown Forces the current primary to step down and become a secondary , forcing an election. replSetSyncFrom Explicitly override the default logic for selecting a member to replicate from. resync Forces a mongod to re-synchronize from the master . For master-slave replication only. applyOps Internal command that applies oplog entries to the current data set. isMaster Displays information about this member’s role in the replica set, including whether it is the master. replSetGetConfig Returns the replica set’s configuration object. Replica Set Configuration (page 652) Complete documentation of the replica set configuration object returned by rs.conf() . The local Database (page 652) Complete documentation of the content of the local database that mongod in- stances use to support replication. Replica Set Member States (page 654) Reference for the replica set member states. Read Preference Reference (page 656) Complete documentation of the five read preference modes that the Mon- goDB drivers support. 651 9.4. Replication Reference