- Reference >
- Database Commands >
- replSetInitiate
replSetInitiate¶
-
replSetInitiate
¶ The
replSetInitiate
command initializes a new replica set. Use the following syntax:The
<config_document>
is a document that specifies the replica set’s configuration. For instance, here’s a config document for creating a simple 3-member replica set:A typical way of running this command is to assign the config document to a variable and then to pass the document to the
rs.initiate()
helper:See also
“Replica Set Configuration,” “Replica Set Operation and Management,” and “Replica Set Reconfiguration.”