Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8342065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:39:50+00:00 2026-06-09T05:39:50+00:00

I type `mongo` in terminal it connects to mongodb. I have many database and

  • 0

I type

`mongo`

in terminal it connects to mongodb.
I have many database and collection there.
I want to export my

 `hero` (dbs name)

and its collection

users

to a desktop in new folder.
By copying that folder and paste in another computer, I want to import that

`hero(dbs name)`

and its collection.
Now when i type

show dbs 

then there should be

`hero`

in my second computer. How can i do this.
I use mongodump also.
can anyone give me the idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:39:52+00:00Added an answer on June 9, 2026 at 5:39 am

    This is a good manual page from 10gen showing example commands and what not for doing what you want: http://docs.mongodb.org/manual/administration/backups/#database-dumps and http://www.mongodb.org/display/DOCS/Import+Export+Tools#ImportExportTools-mongodump .

    So an example for you would be (to copy the collection):

    mongodump --collection hero --database name
    

    And then to restore it on the other computer after copying the output of the above command to the current folder where mongorestore is held:

    mongorestore --collection hero --database name
    

    I am unsure what OS you are using as such I have placed these in Linux command syntax.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the MongoDB shell, if I type someDoc._id , Mongo replies with something like
Let's say I have a List<Pet> and each Pet has a Pet.Name and Pet.Type
I have the following objects in my mongo db: { type : timetype time
I have to read an existing mongo database. Is mongoid suitable for this? All
Is there any way how to use long integer data type in Mongo shell?
I'm trying to query a collection in mongo that's structured like this... { type:apple
Type.GetFields() does not return fields in a particular order, but I want to sort
Start server: bin\mongod.exe -dbpath=D:\mongo\dbs -rest -logpath=logs\server.log -logappend -noauth In java: Mongo mongo = new
I'm trying to use mongodb with PHP. For that, I have created a MongoHQ
I have a database schema in Symfony like this: Persona: actAs: { Timestampable: ~

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.