Solution for How to MongoRestore w/ –drop and nsExclude
is Given Below:
I have a Mongo DB with dozens of collections. I will create a “golden archive” that I want to restore at certain times using mongodump. The golden archive contains a subset of collections we want to restore. There is another collection that will be in the “operational DB” that I don’t want “dropped” upon a restore, and i don’t want overwritten via the restore. Basically I want this collection to be untouched.
Seems that having a command mongodb dump and restore command(s) naming all my collections is a bit silly.
Is this doable using the mongorestore with “drop” w/ nsExclude ?? If not, what are my alternatives.