This might take some thought. I think there are valid use cases where the user does want to dump a backup/copy of docs from a view.
mongodump will dump only metadata from views by default. We are going to add a --viewsAsCollections option to mongodump which will exclude normal collections and dump the data in views as a collection without the view metadata.
Gabriel and I discussed this and decided that the tools should always not dump any metadata for views, given that the relevant information is already captured in the dump of system.views. Metadata for views will be dumped and system.views will be excluded.
- depends on
-
SERVER-25622 system.views should not appear in listCollections
- Closed
- is duplicated by
-
TOOLS-1258 Tools may need to pass filter to listCollections to exclude views in some cases
- Closed