mongorestore will only delete the existing collection if you use the --drop argument.
If you do not use --drop , all documents will be inserted into the existing collection if the document with the same _id no longer exists. Documents with the same _id will be skipped, they will not be merged. Therefore, mongorestore will never delete or modify any existing default data.
Niels van der Rest Oct 26 '10 at 8:27 2010-10-26 08:27
source share