2

在我的开发人员机器上,我重新安装了 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...
4

1 回答 1

2

好的,我已经复制了根目录下的文件并忘记了它们。现在一切都像魅力一样运作。

于 2012-12-06T16:49:05.047 回答