mongodb recovery removed records

2019-07-24 18:34发布

I have a two-member replica set, I accidentally removed all documents in an collection, I am not sure how I did this, but it's gone. Is it possible to get all the data back?

1条回答
Root(大扎)
2楼-- · 2019-07-24 19:36

Unless you have a backup (always recommended for just this type of thing), or one of the replicas is using slavedelay, then I am afraid the removal of the records is final. You might have been able to force a shutdown in time to save the data on-disk if you killed the process before the next fsync to disk (similarly if you broke replication before the removal was replicated), but even then it would be tricky.

查看更多
登录 后发表回答