I have a bunch of collections with the same prefix e.g. data_user_1, data_user_2 etc. There are also a few collection in between that I wanted to keep and skip from dropping.
So I search for a solution to
a) drop all exclude specific b) drop all data_user_*
I searched the docs but there seems to be no parameter that allows any of these operations. Thank you
Unfortunately there is no such option.
You can retrieve all the available collections using getCollectionNames
Then you can check for include/exclude scenarios.
When the condition matches, you can perform drop
on it.