Scott Babineaux commented
backup your database before making changes, then restore it if needed.
Chris Daniels commented
You might want to send this to MongoDB itself and have them support transactions and transaction log rollbacks. I don't see how MongoChef would be the place for this functionality.
Joel Tello commented
yea this would be very helpful when writing a query
Keep a history of the exact changes (field by field) and undo if possible.