首页 > 解决方案 > 为 mongodb 恢复数据

问题描述

有人劫持了我的mongodb。以前,我有一个数据库名称“comics”,其中包含许多集合。现在,“comics”数据库被删除,取而代之的是一个名为“RECOVERY”的新数据库。在这个数据库中,只有一个同名“RECOVERY”的集合有3条记录:

{ "_id" : ObjectId("5da4ddf276d47f81f23a5b00"), "mail" : "whitx@gmx.com" }
{ "_id" : ObjectId("5da4ddf276d47f81f23a5b01"), "mail" : "whitx@gmx.com" }
{ "_id" : ObjectId("5da4ddf376d47f81f23a5b02"), "mail" : "whitx@gmx.com" }

当我检查数据文件夹时/var/lib/mongodb/,它有以下文件:

-rw-r--r-- 1 mongodb mongodb    49 May  6  2018 WiredTiger
-rw-r--r-- 1 mongodb mongodb    21 May  6  2018 WiredTiger.lock
-rw-r--r-- 1 root    root     1001 Oct 14 22:35 WiredTiger.turtle
-rw-r--r-- 1 mongodb mongodb 53248 Oct 14 22:35 WiredTiger.wt
-rw-r--r-- 1 root    root     4096 Oct 14 22:32 WiredTigerLAS.wt
-rw-r--r-- 1 mongodb mongodb 36864 Oct 14 22:32 _mdb_catalog.wt
-rw-r--r-- 1 root    root    36864 Oct 14 22:33 collection-0--7743332637364831833.wt
-rw-r--r-- 1 root    root    32768 Oct 14 22:32 collection-6-2978034477663448513.wt
drwxr-xr-x 2 mongodb mongodb  4096 Oct 14 22:38 diagnostic.data
-rw-r--r-- 1 root    root    16384 Oct 14 21:49 index-0-1498091654758504369.wt
-rw-r--r-- 1 root    root    32768 Oct 14 22:33 index-1-1498091654758504369.wt
drwxr-xr-x 2 mongodb mongodb  4096 Oct 14 22:33 journal
-rw-r--r-- 1 mongodb mongodb     6 Oct 14 22:32 mongod.lock
-rw-r--r-- 1 mongodb mongodb 36864 Oct 14 22:34 sizeStorer.wt
-rw-r--r-- 1 mongodb mongodb    95 May  6  2018 storage.bson

我可以看到文件夹的大小约为 500Mb。我有机会恢复我的数据吗?非常感谢。

标签: mongodb

解决方案


推荐阅读