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

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -