也许是因为MongoDB 2.6版和2.4版本的数据之间存在冲突,但这就是问题所在。
$ ./scripts/mongo/mongo-restore-local.sh "$HOME/mongodump_dev"
2017-09-26T18:08:48.425-0700 preparing collections to restore from
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/WiredTiger", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/WiredTiger.lock", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/WiredTiger.turtle", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/WiredTiger.wt", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/WiredTigerLAS.wt", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/_mdb_catalog.wt", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/WiredTiger", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/WiredTiger.lock", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/WiredTiger.turtle", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/WiredTiger.wt", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/WiredTigerLAS.wt", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/_mdb_catalog.wt", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/collection-0-393995361810699373.wt", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/collection-2-393995361810699373.wt", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with subdirectory "cdt_db/diagnostic.data", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/index-1-393995361810699373.wt", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/index-3-393995361810699373.wt", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/index-4-393995361810699373.wt", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with subdirectory "cdt_db/journal", skipping...
2017-09-26T18:08:48.425-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/mongod.lock", skipping...
2017-09-26T18:08:48.426-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/cdt_db/sizeStorer.wt", skipping...
2017-09-26T18:08:48.426-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/collection-0-1615163121329617102.wt", skipping...
2017-09-26T18:08:48.426-0700 don't know what to do with file "/Users/alexamil/mongodump_dev/collection-2-1615163121329617102.wt", skipping...
2017-09-26T18:08:48.426-0700 Failed: error scanning filesystem: invalid database name 'diagnostic.data': illegal character '.' found in db name 'diagnostic.data'
运行上述内容的脚本如下:
mongorestore "$1" --authenticationDatabase "admin"
" $ HOME / mongodump_dev"通过运行mongodump命令,目录中充满了mongo数据。
有谁知道我为什么会收到这个错误
2017-09-26T18:08:48.426-0700 Failed: error scanning filesystem: invalid database name 'diagnostic.data': illegal character '.' found in db name 'diagnostic.data'
是mongodb版本2.6 / 2.4冲突吗?