批量替换
1 | db.getCollection("content_291").find().forEach( |
导入Mongo
1 | mongorestore -h Node1 -u dguser1 -p 123456 -d dgcloud --gzip --drop /work/sql_backup/dgcloud |
登录Mongo
1 | mongo -u dguser1 -p --authenticationDatabase dgcloud --host Node1 |
导出Mongo
1 | mongodump -uroot -h 127.0.0.1:27017 --authenticationDatabase admin -d dgcloud -o /home/ |