【问题标题】:panic: runtime error: slice bounds out of range when using mongorestore.exe?恐慌:运行时错误:使用 mongorestore.exe 时切片超出范围?
【发布时间】:2015-11-21 01:26:00
【问题描述】:

当我尝试使用 mongorestore.exe 恢复某些集合时,我收到了该错误。

mongorestore.exe --collection user --db dbName dump/dbName/user.bson

这与文件名太长有关吗?较小的集合似乎可以恢复正常,但较大的集合会因该错误而失败。

【问题讨论】:

  • 这个你搞定了吗?有同样的问题

标签: mongodb slice mongorestore


【解决方案1】:

这发生在我身上,因为我使用错误的大小写在集合上创建了索引,而不是 currentgames,索引是在 currentGames 上创建的。
因此,当 mongodump 运行时,currentgames 的元数据文件被 currentGames 集合中的元数据覆盖,并且在恢复时发生此错误

请务必检查您的大小写和数据库中的集合。

希望这会有所帮助!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-12
    • 1970-01-01
    • 1970-01-01
    • 2014-11-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多