“uncap” a capped MongoDB collection

前端 未结 2 562
甜味超标
甜味超标 2021-01-18 06:12

is there a way to \"uncap\" a capped collection? Creating a new collection and copy the data isn\'t an option for me.

thanks

2条回答
  •  悲&欢浪女
    2021-01-18 06:33

    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.

提交回复
热议问题