注意:整库备份文件形式,需要找到和原始数据版本一致的数据库,才可以进行数据恢复。
转载自(博客不支持过长链接):https://www.appsloveworld.com/mongodb/100/95/mongodb-community-failed-to-start-up-wiredtiger-under-any-compatibility-version
This usually happens on upgrades, so please check your mongo version. I had the same issue on a couple of servers. The proper way to avoid this is to set FCV (featureCompatibilityVersion) to the correct one before we do mongo upgrade. In this case, it should be set to version 4.2 before we do upgrade to mongo 4.4. To check current FCV, run this command in mongo shell (admin db):
db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })
In my case it was 4.0, so I had to update it by executing:
db.adminCommand( { setFeatureCompatibilityVersion: "4.2" } )
And then upgrade to mongo 4.4 was smooth.
In case you have already messed up it should be possible to downgrade to mongo 4.2.6 or a later version, update FCV as stated above, and then upgrade to mongo 4.4. Based on your logs, look like it does not have permissions to access some files (e.g. /var/lib/mongodb/), so make sure those are owned by mongodb user.