mongorestore
will only drop the existing collection if you use the --drop
argument.
If you don’t use --drop
, all documents will be inserted into the existing collection, unless a document with the same _id
already exists. Documents with the same _id
will be skipped, they are not merged. So mongorestore
will never delete or modify any of the existing data by default.