我的Mac macOs High Sierra v10.13.1
上安装了MongoDB v3.2.6,我想在升级之前进行备份。
我有一个使用defaut db位置和默认端口在一个窗口中运行的$ mongod
实例。
这是我的本地数据库,不受密码保护,不需要ssl密码。
我可以使用$ mongo
或Robomongo访问我的数据库,但是当我运行$ mongodump
或$ mongodump --db mydatabase
时,出现以下错误[1] 1815 segmentation fault mongodump
更新:我尝试运行mongostat
,现在出现以下错误:[1] 2404 bus error mongodump
这是我使用$ mongod
启动数据库时获得的日志:
2017-12-25T12:36:26.642+0000 I CONTROL [initandlisten] MongoDB starting : pid=3216 port=27017 dbpath=/data/db 64-bit host=MBP-de-Kevin.home
2017-12-25T12:36:26.643+0000 I CONTROL [initandlisten] db version v3.2.6
2017-12-25T12:36:26.643+0000 I CONTROL [initandlisten] git version: 05552b562c7a0b3143a729aaa0838e558dc49b25
2017-12-25T12:36:26.643+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2m 2 Nov 2017
2017-12-25T12:36:26.643+0000 I CONTROL [initandlisten] allocator: system
2017-12-25T12:36:26.643+0000 I CONTROL [initandlisten] modules: none
2017-12-25T12:36:26.643+0000 I CONTROL [initandlisten] build environment:
2017-12-25T12:36:26.643+0000 I CONTROL [initandlisten] distarch: x86_64
2017-12-25T12:36:26.643+0000 I CONTROL [initandlisten] target_arch: x86_64
2017-12-25T12:36:26.643+0000 I CONTROL [initandlisten] options: {}
2017-12-25T12:36:26.644+0000 I - [initandlisten] Detected data files in /data/db created by the 'mmapv1' storage engine, so setting the active storage engine to 'mmapv1'.
2017-12-25T12:36:26.653+0000 I JOURNAL [initandlisten] journal dir=/data/db/journal
2017-12-25T12:36:26.654+0000 I JOURNAL [initandlisten] recover : no journal files present, no recovery needed
2017-12-25T12:36:26.674+0000 I JOURNAL [durability] Durability thread started
2017-12-25T12:36:26.675+0000 I JOURNAL [journal writer] Journal writer thread started
2017-12-25T12:36:26.894+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2017-12-25T12:36:26.894+0000 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2017-12-25T12:36:26.894+0000 I NETWORK [initandlisten] waiting for connections on port 27017
我在做什么错,我该如何调试?
最佳答案
我遇到了同样的问题。我在macOS High Sierra 10.13.3上。我的mongo版本是mongodb 3.2.7。我在documentation of mongodump中阅读了此内容:
MAC OSX SIERRA AND GO 1.6 INCOMPATIBILITY
Users running on Mac OSX Sierra require the 3.2.10 or newer version of mongodump.
我升级到mongodb 3.6.2,并且我的问题已解决。
关于mongodb - mongodump给出段错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47964990/