How to rollback in MongoDB

I have accidentally deleted a few records in the lab quiz

You cannot rollback

Drop your cluster,create a new cluster and load the sample data again
If you have a backup dump you can restore db/collection with mongorestore/mongoimport

1 Like