Cloning a database without its data

Hello Everyone,
Is there any way to copy all collections into another database in the same server in MongoDB 4.4? The size of database is around 150GB, and it is also a replica set.
So it’s not efficient way that clone a collection, then delete all documents in the new collection. Do you have any suggestion about copying collections without its documents?
Thanks in advance.

Check these links.May help

Above link discusses about cloning only one collection


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.