Explore Courses Blog Tutorials Interview Questions
0 votes
in Web Technology by (50.2k points)

Is there some procedure to rollback my last query mongo collection as I have deleted some documents in my last query.

The query is as follows :{ "name" : "some_x_name"}) 

1 Answer

0 votes
by (108k points)
edited by

No, you can’t rollback your queries as there is no such thing as a rollback in MongoDB.  But you can use oplog (operations log) as this is a distinctive capped collection that maintains a rolling record of all processes/operations that you have used to modify the data that is stored inside your MongoDB databases.

Do you want to be a full-stack developer? Enroll in this Full Stack Certification to get started with your journey.

Related questions

Browse Categories