Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
mongodb-3.0
-
None
-
None
Description
http://docs.mongodb.org/manual/reference/program/mongorestore/#cmdoption--drop
The --drop option for mongorestore states "Modifies the restoration procedure to drop every collection from the target database before restoring the collection from the dumped backup."
This should be reworded based on the current behavior. The --drop will not affect collections in the target database, if they are not in the dump. For example:
- Create DB abc
- Create collections c1 & c2 and populate
- mongodump abc
- Create collection c3 and populate
- Add documents to c1 & c2
- mongorestore abc --drop
The collections c1 & c2 will be restored from the dump, but c3 will still exist with the documents.
CC: mpobrien Please confirm this is the expected behavior.