⇤ ← Revision 1 as of 2017-11-23 09:36:21
194
Comment:
|
337
|
Deletions are marked like this. | Additions are marked like this. |
Line 9: | Line 9: |
* Check if current server is the write {{{ mongo admin --host $ip -u root -p $pass --quiet --eval "db.isMaster()['ismaster']" }}} |
MongoDB nosql notes
Replicaset
- View members
mongo admin --host $ip -u root -p $pass -eval "rs.status()"
- Check if current server is the write
mongo admin --host $ip -u root -p $pass --quiet --eval "db.isMaster()['ismaster']"
...