这两个mongo数据文件夹有什么区别? 我的mongod dbpath指向C:/ data / db,但是我也注意到我在C:\ Program Files \ MongoDB \ Server \ 4.0 \中有一个数据文件夹,其中也包含索引和集合。
我注意到这的唯一原因是因为我关闭不干净并丢失了1.77亿个文档,因此正试图着眼于这个问题(旁注:即使mongo可以为该丢失的集合重建索引,也无法恢复)
编辑
这是服务器文件夹中的日志文件,在这里我可以看到指向其他位置的dbpath
**aborting after fassert() failure
2018-11-18T11:40:34.164+0100 I CONTROL [main] ***** SERVER RESTARTED *****
2018-11-18T11:40:36.984+0100 I CONTROL [main] Trying to start Windows service 'MongoDB'
2018-11-18T11:40:37.092+0100 I CONTROL [initandlisten] MongoDB starting : pid=4252 port=27017 dbpath=C:\Program Files\MongoDB\Server\4.0\data 64-bit host=DESKTOP-IO5LL15
2018-11-18T11:40:37.092+0100 I CONTROL [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2018-11-18T11:40:37.092+0100 I CONTROL [initandlisten] db version v4.0.4
2018-11-18T11:40:37.092+0100 I CONTROL [initandlisten] git version: f288a3bdf201007f3693c58e140056adf8b04839
2018-11-18T11:40:37.092+0100 I CONTROL [initandlisten] allocator: tcmalloc
2018-11-18T11:40:37.093+0100 I CONTROL [initandlisten] modules: none
2018-11-18T11:40:37.093+0100 I CONTROL [initandlisten] build environment:
2018-11-18T11:40:37.093+0100 I CONTROL [initandlisten] distmod: 2008plus-ssl
2018-11-18T11:40:37.093+0100 I CONTROL [initandlisten] distarch: x86_64
2018-11-18T11:40:37.093+0100 I CONTROL [initandlisten] target_arch: x86_64
2018-11-18T11:40:37.093+0100 I CONTROL [initandlisten] options: { config: "C:\Program Files\MongoDB\Server\4.0\bin\mongod.cfg", net: { bindIp: "127.0.0.1", port: 27017 }, service: true, storage: { dbPath: "C:\Program Files\MongoDB\Server\4.0\data", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "C:\Program Files\MongoDB\Server\4.0\log\mongod.log" } }
2018-11-18T11:40:37.099+0100 W STORAGE [initandlisten] Detected unclean shutdown - C:\Program Files\MongoDB\Server\4.0\data\mongod.lock is not empty.
2018-11-18T11:40:37.100+0100 I STORAGE [initandlisten] Detected data files in C:\Program Files\MongoDB\Server\4.0\data created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-11-18T11:40:37.100+0100 W STORAGE [initandlisten] Recovering data from the last clean checkpoint.