mongodb - how to copy a collection from one from another in robomongo -
i have collection named dashboard in 1 db , want copy collection db using robomongo. how can this? tried creating new collection in 2nd db , tried copying failed. please me
another db - connection. robomongo works 1 connection in 1 period of time. why impossible.
i suggest use mongoimport/mongoexoprt tools task. comes mongo, located in same folder mongod.exe , allows move collections via databases, exporting , importing json
file.
code sample:
mongoexport --db testfrom --port portfrom --username userfrom --password passwordfrom --collection yourcollection --out test.json mongoimport --db testto --port portto --username userto --password passwordto --collection yourcollection --file test.json
Comments
Post a Comment