重新启动mongod进程后,我丢失了所有数据库集合。
在mongo shell中,键入show collections
没有显示任何内容。我试图使用mongod --repair,但没有任何反应。 Mongod配置文件没问题,但它似乎没有被init脚本加载。但是,当我使用mongod --config /etc/mongod.conf
时,它也无法解决问题。
我没有选择。 MongoDb是否有可能覆盖我的数据库?我有什么选择来恢复它?
我尝试了mongodump,但它没有什么可以备份
以下是上次尝试的日志:
2015-12-07T00:25:04.179+0200 I JOURNAL [initandlisten] journal dir=/data/db/journal
2015-12-07T00:25:04.179+0200 I JOURNAL [initandlisten] recover : no journal files present, no recovery needed
2015-12-07T00:25:04.263+0200 I JOURNAL [durability] Durability thread started
2015-12-07T00:25:04.263+0200 I JOURNAL [journal writer] Journal writer thread started
2015-12-07T00:25:04.327+0200 I CONTROL [initandlisten] MongoDB starting : pid=6403 port=27017 dbpath=/data/db 64-bit
2015-12-07T00:25:04.327+0200 I CONTROL [initandlisten]
2015-12-07T00:25:04.327+0200 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2015-12-07T00:25:04.327+0200 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2015-12-07T00:25:04.327+0200 I CONTROL [initandlisten]
2015-12-07T00:25:04.328+0200 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2015-12-07T00:25:04.328+0200 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2015-12-07T00:25:04.328+0200 I CONTROL [initandlisten]
2015-12-07T00:25:04.328+0200 I CONTROL [initandlisten] db version v3.0.7
2015-12-07T00:25:04.328+0200 I CONTROL [initandlisten] git version: 6ce7cbe8c6b899552dadd907604559806aa2e9bd
2015-12-07T00:25:04.328+0200 I CONTROL [initandlisten] build info: Linux ip-10-229-88-125 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-12-07T00:25:04.328+0200 I CONTROL [initandlisten] allocator: tcmalloc
2015-12-07T00:25:04.328+0200 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, storage: { dbPath: "/data/db", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2015-12-07T00:25:04.346+0200 I NETWORK [initandlisten] waiting for connections on port 27017
感谢。