- Reference >
- mongo Shell Methods >
- Replication Methods >
- rs.initiate()
rs.initiate()¶
On this page
Description¶
- rs.initiate(configuration)¶
Initiates a replica set. Optionally takes a configuration argument in the form of a document that holds the configuration of a replica set.
The rs.initiate() method has the following parameter:
Parameter Type Description configuration document Optional. A document that specifies configuration settings for the new replica set. If a configuration is not specified, MongoDB uses a default configuration. The rs.initiate() method provides a wrapper around the “replSetInitiate” database command.
Replica Set Configuration¶
See Member Configuration Tutorials and Replica Set Configuration for examples of replica set configuration and invitation objects.