0

I was reading about Mongodb System Profiler where it logs all mongodb queries. But is there any query by which i can see past queries which removed any document from my database like findandremove.

Below is the query I tried but it logged all past queries.

db.system.profile.find().pretty()

1 Answer 1

1

you can do it like this:

db.system.profile.find({"op": "remove"}).pretty()

This assume that you have enable full profiling with db.setProfilingLevel(2) before running the remove() operation

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.