Initialize a replica set on a self-managed deployment.
Section: Replica set and diagnostics
Initiate a simple replica set
javascript
javascript
rs.initiate()Explanation
This is commonly used during local testing or first-time replica set setup.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Replica set and diagnostics
Watch read and write time with mongotop
See how much time collections spend reading and writing.
Restore a dump and drop existing data first
Restore into a collection or database after clearing prior content.