mongodb - 为 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。我有机会恢复我的数据吗?非常感谢。
解决方案
推荐阅读
- swift - CollectionViewCell:通过indexPath访问单元格的数据?
- android - 单击按钮时不会转到另一个视图
- angular - 离子“离子按钮”不是已知元素:“我该如何解决这个问题?
- google-kubernetes-engine - 用户在使用 Workload Identity 时无权充当服务帐户
- c++ - C++ 使用套接字从 URL 下载文件
- c# - 字符串上的 Any()
- web-scraping - 通过 colab 将音频和相关文本从 ganjoor 站点抓取为波斯语语音到文本数据库
- python - 安装 pyenv-win 后本地 python 版本没有改变
- wordpress - Wordpress:是否有插件来检查登录用户是否在谷歌表格中?
- java - 在运行时选择 2 个 Bean