Replication Reference
On this page
This version of the documentation is archived and no longer supported. View the current documentation to learn how to upgrade your version of MongoDB server.
Replication Methods in mongosh
Name | Description |
---|---|
Adds a member to a replica set. | |
Adds an arbiter to a replica set. | |
Returns the replica set configuration document. | |
Prevents the current member from seeking election as primary for a period of time. | |
Returns basic help text for replica set functions. | |
Initializes a new replica set. | |
Prints a formatted report of the replica set status from the
perspective of the primary. | |
Prints a formatted report of the replica set status from the
perspective of the secondaries. | |
Re-configures a replica set by applying a new replica set configuration object. | |
Remove a member from a replica set. | |
Returns a document with information about the state of the replica set. | |
Sets the member that this replica set member will sync from, overriding the default sync target selection logic. |
Replication Database Commands
Name | Description |
---|---|
Internal command that applies oplog entries to the current data set. | |
Displays information about this member's role in the replica set,
including whether it is the primary. | |
Forces the elected primary to abort sync (catch up) then complete the transition to primary. | |
Prevents the current member from seeking election as primary for a period of time. | |
Returns the replica set's configuration object. | |
Returns a document that reports on the status of the replica set. | |
Initializes a new replica set. | |
Enables or disables a maintenance mode, which puts a secondary node in a RECOVERING state. | |
Applies a new configuration to an existing replica set. | |
Dynamically resizes the oplog for a replica set member. Available for WiredTiger storage engine only. | |
Explicitly override the default logic for selecting a member to replicate from. |
Replica Set Reference Documentation
- Replica Set Configuration
- Complete documentation of the replica set configuration
object returned by
rs.conf()
. - Replica Set Protocol Version
- Reference on the replica set protocol version.
- Troubleshoot Replica Sets
- Replica set trouble shooting guide.
- The
local
Database - Complete documentation of the content of the
local
database thatmongod
instances use to support replication. - Replica Set Member States
- Reference for the replica set member states.