Mongodb mongo升级,现在我的数据不可比

Mongodb mongo升级,现在我的数据不可比,mongodb,upgrade,wiredtiger,Mongodb,Upgrade,Wiredtiger,我今天在我的mac电脑上进行了brew更新/升级,然后mongodb导致我的mac电脑严重崩溃。我现在正试图把我的数据放到Atlas集群中。我现在只有/data/db文件。我得把它们扔了,把它们运到阿特拉斯。我没有弄乱我的mac电脑,而是搬到了Ubuntu。在Ubuntu上,我安装了Mongo3.6.6。我试着启动mongod,得到了下面的消息。我搜索了又搜索,尝试了很多东西都没有成功。请告知 root@risksheet:/opt/marc# mongod 2018-08-09T21:35:0

我今天在我的mac电脑上进行了brew更新/升级,然后mongodb导致我的mac电脑严重崩溃。我现在正试图把我的数据放到Atlas集群中。我现在只有/data/db文件。我得把它们扔了,把它们运到阿特拉斯。我没有弄乱我的mac电脑,而是搬到了Ubuntu。在Ubuntu上,我安装了Mongo3.6.6。我试着启动mongod,得到了下面的消息。我搜索了又搜索,尝试了很多东西都没有成功。请告知

root@risksheet:/opt/marc# mongod
2018-08-09T21:35:01.592-0400 I CONTROL  [initandlisten] MongoDB starting : pid=26111 port=27017 dbpath=/data/db 64-bit host=risksheet
2018-08-09T21:35:01.592-0400 I CONTROL  [initandlisten] db version v3.6.6
2018-08-09T21:35:01.592-0400 I CONTROL  [initandlisten] git version: 6405d65b1d6432e138b44c13085d0c2fe235d6bd
2018-08-09T21:35:01.592-0400 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
2018-08-09T21:35:01.592-0400 I CONTROL  [initandlisten] allocator: tcmalloc
2018-08-09T21:35:01.592-0400 I CONTROL  [initandlisten] modules: none
2018-08-09T21:35:01.592-0400 I CONTROL  [initandlisten] build environment:
2018-08-09T21:35:01.592-0400 I CONTROL  [initandlisten]     distmod: ubuntu1604
2018-08-09T21:35:01.593-0400 I CONTROL  [initandlisten]     distarch: x86_64
2018-08-09T21:35:01.593-0400 I CONTROL  [initandlisten]     target_arch: x86_64
2018-08-09T21:35:01.593-0400 I CONTROL  [initandlisten] options: {}
2018-08-09T21:35:01.593-0400 I -        [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-08-09T21:35:01.593-0400 I STORAGE  [initandlisten] 
2018-08-09T21:35:01.593-0400 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2018-08-09T21:35:01.593-0400 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
2018-08-09T21:35:01.593-0400 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=991M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),cache_cursors=false,compatibility=(release="3.0",require_max="3.0"),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2018-08-09T21:35:02.492-0400 E STORAGE  [initandlisten] WiredTiger error (-31802) [1533864902:492320][26111:0x7f9ce698c9c0], connection: Version incompatibility detected: unsupported WiredTiger file version: this build requires a maximum version of 2, and the file is version 3: WT_ERROR: non-specific WiredTiger error
2018-08-09T21:35:02.498-0400 E -        [initandlisten] Assertion: 28595:-31802: WT_ERROR: non-specific WiredTiger error src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 421
2018-08-09T21:35:02.498-0400 I STORAGE  [initandlisten] exception in initAndListen: Location28595: -31802: WT_ERROR: non-specific WiredTiger error, terminating
2018-08-09T21:35:02.498-0400 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2018-08-09T21:35:02.498-0400 I NETWORK  [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2018-08-09T21:35:02.498-0400 I CONTROL  [initandlisten] now exiting
2018-08-09T21:35:02.498-0400 I CONTROL  [initandlisten] shutting down with code:100
root@risksheet:/opt/marc# 

我还尝试将引擎设置为WiredTiger,但没有任何帮助。

删除/data/db目录,然后重新创建它们,授予它们权限,然后使用mongod重新启动

sudo rm-射频/数据/数据库 sudo mkdir/data/db
sudo chmod 777/data/db这是个好主意,我也试过了。当我最终安装了正确版本的Mongo时,我能够读取数据/db文件并转储它们。然后我可以将它们加载到最新版本中


一切都很好,谢谢。

您是否尝试将featureCompatibilityVersion设置为3.4以便降级?我认为您需要在较旧的mongoDB版本中获取数据,确保一切正常,然后再次设置featureCompatibilityVersion。。。我可能错了,但值得一试/研究一下你的终端如果他有数据,不要删除mp3por:如果你正在使用test mongo,这是一个很好的解决方案。