gpt4 book ai didi

mongodbrestore 似乎没有恢复所有文件

转载 作者:可可西里 更新时间:2023-11-01 10:01:19 24 4
gpt4 key购买 nike

在 dump/enron 目录中 messages.bson 和 messages.medata.json 字段。它应该恢复120,477 份文件。我想从中恢复数据。我输入命令:

mongorestore -v --db enron --drop  dump/enron

命令完成后我收到一条消息:找到 120477 个对象不知道如何处理文件 [dump/enron/messages.metadata.json]

但在收集消息中我看到 112196 个文档使用:

db.messages.count()

你能告诉我它有什么问题吗?命令的输出:

c:\mongodb\mongodb-win32-i386-2.0.5\bin>mongorestore -v  dump/enron/
Tue Dec 11 14:17:39 creating new connection to:127.0.0.1
Tue Dec 11 14:17:39 BackgroundJob starting: ConnectBG
Tue Dec 11 14:17:39 connected connection!
connected to: 127.0.0.1
Tue Dec 11 14:17:39 dump/enron/messages.bson
Tue Dec 11 14:17:39 going into namespace [enron.messages]
Tue Dec 11 14:17:39 file size: 396236668
126878231/396236668 32%
270206614/396236668 68%
375698921/396236668 94%
381433738/396236668 96%
387378348/396236668 97%
394626836/396236668 99%
120477 objects found
don't know what to do with file [dump/enron/messages.metadata.json]

消息:“不知道如何处理文件 [dump/enron/messages.metadata.json]”是什么意思?

最佳答案

这应该有效:

ssharma$ mongorestore -d enron --collection messages /dump/enron/messages.bson
connected to: 127.0.0.1
Thu Mar 7 13:05:05 /dump/enron/messages.bson
Thu Mar 7 13:05:05 going into namespace [enron.messages]
Thu Mar 7 13:05:09 74234213/396236668 18% (bytes)
Thu Mar 7 13:05:12 126614885/396236668 31% (bytes)
Thu Mar 7 13:05:15 192098158/396236668 48% (bytes)
Thu Mar 7 13:05:18 208083274/396236668 52% (bytes)
Thu Mar 7 13:05:21 231816712/396236668 58% (bytes)
Thu Mar 7 13:05:24 293564538/396236668 74% (bytes)
Thu Mar 7 13:05:27 356071219/396236668 89% (bytes)
Thu Mar 7 13:05:30 379387449/396236668 95% (bytes)
120477 objects found
Thu Mar 7 13:05:32 Creating index: { key: { _id: 1 }, ns: "enron.messages", name: "_id_" }
ssharma$ ./mongo
MongoDB shell version: 2.2.2
connecting to: test
> use enron
switched to db enron
> db.messages.count()
120477

关于mongodbrestore 似乎没有恢复所有文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13817789/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com