mongodb cloneCollection cloneDb
db.runCommand({cloneCollection:"dbName.collectionName",from:"host",username:"***",password:"***"});
cloneCollection 远程复制集合,参数是数据库名称.集合名称
from 集合的源 ip:port
query 当前这个在上面语句中缺省,是BasicDbObject
原创
2018-01-05 10:34:30 ·
1367 阅读 ·
0 评论