is there a way to "uncap" a capped collection? Creating a new collection and copy the data isn't an option for me.
thanks
is there a way to "uncap" a capped collection? Creating a new collection and copy the data isn't an option for me.
thanks
No, You can convert a non-capped collection to a capped collection using the "convertToCapped" command but there's no way to go the other way.
Your only option is to clone the collection to a non capped one and rename it which obviously involves downtime.
Unfortunately, the only option here is to copy collection, remove the old one and rename the new one:
$> db.collection_name.copyTo('collection_name2')
$> db.collection_name.isCapped()
true
$> db.collection_name.drop()
$> db.collection_name2.renameCollection('collection_name')
$> db.collection_name.isCapped()
false