[英]How to create a batch file to repair and start corrupted mongoDB in windows?
I am unable to start my mongoDB after an unclean system shutdown.在不干净的系统关闭后,我无法启动我的 mongoDB。 There is a mongod.lock with a size of 1 KB.
有一个大小为 1 KB 的 mongod.lock。 I want to delete this file and then repair the mongoDB.
我想删除这个文件,然后修复mongoDB。 I deleted the file and tried the command
我删除了文件并尝试了命令
mongod --dbpath "%ProgramData%\\mongodb\\data\\db" --repair
mongod --dbpath "%ProgramData%\\mongodb\\data\\db" --repair
But I am getting an error message...但是我收到一条错误消息...
I STORAGE [initandlisten] exception in initAndListen: 72 Requested option conflicts with current storage engine option for directoryPerDB;
I STORAGE [initandlisten] initAndListen 异常:72 请求的选项与 directoryPerDB 的当前存储引擎选项冲突; you requested false but the current server storage is already set to true and cannot be changed, terminating.....
您请求了 false 但当前服务器存储已设置为 true 且无法更改,正在终止.....
Please assist...请协助...
尝试像这样添加--directoryperDB
:
mongod --dbpath "%ProgramData%\mongodb\data\db" --directoryPerDB
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.