MongoDB Documentation, Release 3.0.4 New in version 2.6: rs.printSlaveReplicationInfo() . For previous versions, use db.printSlaveReplicationInfo() . Use the serverStatus as in the following operation, to return status of the replication: db.serverStatus( { repl: 1 } ) See server status repl fields for documentation of the relevant section of output. When running with authorization enabled, in master - slave deployments configure a keyFile so that slave mongod instances can authenticate and communicate with the master mongod instance. To enable authentication and configure the keyFile add the following option to your configuration file: keyFile = /srv/mongodb/keyfile Note: You may chose to set these run-time configuration options using the --keyFile option on the command line. Setting keyFile enables authentication and specifies a key file for the mongod instances to use when authenticating to each other. The content of the key file is arbitrary but must be the same on all members of the deployment can connect to each other. The key file must be less one kilobyte in size and may only contain characters in the base64 set. The key file must not have group or “world” permissions on UNIX systems. Use the following command to use the OpenSSL package to generate “random” content for use in a key file: openssl rand -base64 741 Security (page 317) for more information about security in MongoDB If you want a replication configuration that resembles master - slave replication, using replica sets replica sets, con- sider the following replica configuration document. In this deployment hosts <master> and <slave> 18 provide replication that is roughly equivalent to a two-instance master-slave deployment: See Replica Set Configuration (page 652) for more information about replica set configurations. 18 In replica set configurations, the host field must hold a resolvable hostname. { _id : 'setName', members : [ { _id : 0, host : "<master>", priority : 1 }, { _id : 1, host : "<slave>", priority : 0, votes : 0 } ] } Deploy Master-Slave Equivalent using Replica Sets Ongoing Administration and Operation of Master-Slave Deployments See also: Security 598 Chapter 9. Replication