Replication Commands

Note

For details on specific commands, including syntax and examples,click on the specific command to go to its reference page.

NameDescription
applyOpsInternal command that applies oplog entries to the current data set.
isMasterDisplays information about this member’s role in the replica set, including whether it is the master.
replSetAbortPrimaryCatchUpForces the elected primary to abort sync (catch up) then complete the transition to primary.
replSetFreezePrevents the current member from seeking election as primary for a period of time.
replSetGetConfigReturns the replica set’s configuration object.
replSetGetStatusReturns a document that reports on the status of the replica set.
replSetInitiateInitializes a new replica set.
replSetMaintenanceEnables or disables a maintenance mode, which puts a secondary node in a RECOVERING state.
replSetReconfigApplies a new configuration to an existing replica set.
replSetResizeOplogDynamically resizes the oplog for a replica set member. Available for WiredTiger storage engine only.
replSetStepDownForces the current primary to step down and become a secondary, forcing an election.
replSetSyncFromExplicitly override the default logic for selecting a member to replicate from.