Database Manual / Self-Managed Deployments / Deploy and Manage Self-Managed Replica Sets

Self-Managed Replication Reference自我管理复制参考

Replication Methods in mongosh蒙古语的复制方法

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 formatted report of the replica set status from the perspective of the primary.从主副本的角度打印副本集状态的格式化报告。
rs.printSecondaryReplicationInfo()Prints a formatted report of the replica set status 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.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.使当前的primary成为迫使选举的secondary。
rs.syncFrom()Sets the member that this replica set member will sync from, overriding the default sync target selection logic.设置此副本集成员将从中同步的成员,覆盖默认同步目标选择逻辑。

Replication Database Commands复制数据库命令

Name名称Description描述
applyOpsInternal command that applies oplog entries to the current data set.oplog条目应用于当前数据集的内部命令。
helloDisplays information about this member's role in the replica set, including whether it is the primary.显示有关此成员在副本集中的角色的信息,包括它是否为主成员。
replSetAbortPrimaryCatchUpForces the elected primary to abort sync (catch up) then complete the transition to primary.强制选定的primary中止同步(追赶),然后完成向primary的转换。
replSetFreezePrevents the current member from seeking election as primary for a period of time.阻止当前成员在一段时间内寻求primary
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.启用或禁用维护模式,该模式使secondary节点处于RECOVERING(恢复)状态。
replSetReconfigApplies a new configuration to an existing replica set.将新配置应用于现有副本集。
replSetResizeOplogDynamically resizes the oplog for a replica set member. Available for WiredTiger storage engine only.动态调整副本集成员的oplog大小。仅适用于WiredTiger存储引擎。
replSetStepDownForces the current primary to step down and become a secondary, forcing an election.迫使当前的primary下台,成为secondary,迫使选举。
replSetSyncFromExplicitly override the default logic for selecting a member to replicate from.显式覆盖用于选择要从中复制的成员的默认逻辑。

Replica Set Reference Documentation副本集参考文档

Self-Managed Replica Set Configuration自我管理副本集配置
Complete documentation of the replica set configuration object returned by rs.conf().rs.conf()返回的副本集配置对象的完整文档。
Self-Managed Replica Set Protocol Version自我管理副本集协议版本
Reference on the replica set protocol version.副本集协议版本的参考。
Troubleshoot Replica Sets对副本集进行故障排除
Replica set trouble shooting guide.副本集故障排除指南。
The local Databaselocal数据库
Complete documentation of the content of the local database that mongod instances use to support replication.mongod实例用于支持复制的local数据库内容的完整文档。
Replica Set Member States副本集成员国
Reference for the replica set member states.副本集成员状态的参考。