gpt4 book ai didi

mongodb - 运行mongodb --repair database is empty后

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

在我的开发机器上,我重新安装了 ubuntu,并将文件从我的旧安装复制到/data/db。

在看似正常的 mongo --repair 之后(没有错误消息等),我没有看到我期望看到的数据库。

如何修复我的数据库?

这里是日志文件的第一部分:

Thu Dec  6 17:55:21 [initandlisten] MongoDB starting : pid=2123 port=27017 dbpath=/data/db/ 64-bit host=sog
Thu Dec 6 17:55:21 [initandlisten] db version v2.2.2, pdfile version 4.5
Thu Dec 6 17:55:21 [initandlisten] git version: d1b43b61a5308c4ad0679d34b262c5af9d664267
Thu Dec 6 17:55:21 [initandlisten] build info: Linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49
Thu Dec 6 17:55:21 [initandlisten] options: { repair: true }
Thu Dec 6 17:55:21 [initandlisten] Unable to check for journal files due to: boost::filesystem::basic_directory_iterator constructor: No such file or directory: "/data/db/journal"
Thu Dec 6 17:55:21 [initandlisten] ****
Thu Dec 6 17:55:21 [initandlisten] ****
Thu Dec 6 17:55:21 [initandlisten] need to upgrade database fan-fiction with pdfile version 4.5, new version: 4.5
Thu Dec 6 17:55:21 [initandlisten] starting upgrade
Thu Dec 6 17:55:21 [initandlisten] fan-fiction repairDatabase fan-fiction
Thu Dec 6 17:55:21 [FileAllocator] allocating new datafile /data/db/_tmp_repairDatabase_1/fan-fiction.ns, filling with zeroes...
Thu Dec 6 17:55:21 [FileAllocator] creating directory /data/db/_tmp_repairDatabase_1/_tmp
Thu Dec 6 17:55:21 [FileAllocator] done allocating datafile /data/db/_tmp_repairDatabase_1/fan-fiction.ns, size: 16MB, took 0.001 secs
Thu Dec 6 17:55:21 [FileAllocator] allocating new datafile /data/db/_tmp_repairDatabase_1/fan-fiction.0, filling with zeroes...

最佳答案

好吧,我已经把文件复制到root下了,忘记chown了。现在一切都像魅力一样。

关于mongodb - 运行mongodb --repair database is empty后,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13745066/

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