linux - How to make MongoDB's mongorestore update and replace files with the same _id -


so we've setup sharding , we're migrating of data several clients across several smaller databases bigger, sharded one. problem is, if try move data production , mongorestore, files won't update if have same _id. problem, because several mongorestores might necessary test sharded database , customer production data changes on testing period.

i don't want use --drop, since drop whole collection instead of replacing old files. there way of doing properly?

cheers

i came solution, although not ideal.

i'll use mongoimport --upsert option, instead of mongodump. whole database, might need write script mimic mongodump, oh well.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -