常用命令行
linux导出 JSON 文件
mongoexport -h 111.31.3.11 --port 30100 -u username -p password --authenticationDatabase admin -d your_collect -c your_table -o /data/xxx.json
清空集合
db.getCollection("vpa_dm_resources_api").deleteMany( {} )
删除表
db.getCollection("vpa_dm_resources_api_copy1").drop()
导入 JSON 文件
mongoimport -h 172.31.3.43 --port 30000 -u auto_open_r -p m1kQacRij87mO9UR --authenticationDatabase admin -d civi_vpa_dm -c vpa_dm_resources_api --type json --file /data/vpa_dm_resources_api.json