MongoDB

  1. 切换目录

mongodump -u root -o /data/mongo.back 修改配置文件路径 storage: dbPath: /data/mongo chown -R mongod. /data/mongo systemctl restart mongod mongorestore -uroot –dir=/data/mongo.back/ –drop

  1. 副本集 修改配置文件 replication: replSetName: rs0 rs.initiate()
Yan Peipan 08 February 2017