Cancel delete operation in mongodb

I start by mistake db.collection_name.remove ({condition: 'true'}) from the console and delete the object that I did not plan to delete, can I restore them somehow?

I db on mongohq if it can help?

+4
source share
2 answers

Too late, but to prevent this from happening again, you can add a member to your replica with priority 0 and slaveDelay set to an hour or so so that it is (at least) an hour lower than the main one. This member could be the result of oops- I-maybe-shouldn't-have-hit-enter-yet-yet-yet-yet.

+5
source

MongoDB . , , , - (, Time Machine Mac), MongoHQ, .

MongoHQ Doc () , .

+2

All Articles