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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -