Due to some specific business requirement we were storing data into the MongoDB's capped collection but now complete requirement changed and we want ot preserve all records in that collection.
I am able to find "convertToCapped" command but didn't find any command to perform vise versa operation.
How can I convert it back to non-capped collection?
You can copy it:
Then ensure required indexes and create users in uncapped
yourcollection
. Run your tests, and if you are happy with results, dropoldcapped
.Needless to say it should be done within maintenance window.