Suppose if I have a database testdb with two collections collA and collB and try to restore only collB from a dump.
Will using --drop option with mongorestore drops both the existing collections (collA and collB) from testdb even though only collB is in the dump?
I am using MongoDB 2.6.5
No, actually, according to the official documentation :
--drop Before restoring the collections from the dumped backup, drops the collections from the target database. --drop does not drop collections that are not in the backup.