丢弃db
use something
db.dropDatabase()
backup
# 备份
mongodump -h someip -d somedb
# 还原
cd dump
mongorestore -h someotherip -d somedb ./somedir/
replica-set
# login with the primary node
/usr/local/mongodb/mongo
rs.initiate() # wait unit all op log created, check /bigdata/mongodb/log/mongodb.log
rs.conf()
rs.add("thehostname1")
rs.add(“thehostname2”)
switch primary node
rs.stepDown()