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 6778939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:19:33+00:00 2026-05-26T16:19:33+00:00

Dumped a MongoDB successfully: $ mongodump -h ourhost.com:portnumber -d db_name01 -u username -p I

  • 0

Dumped a MongoDB successfully:

$ mongodump -h ourhost.com:portnumber -d db_name01 -u username -p

I need to import or export it to a testserver and have struggle with it, please help me figure out.

I tried some ways:

$ mongoimport -h host.com:port -c dbname -d dbname_test -u username -p
connected to host.
Password: ...

Gives this error:

assertion: 9997 auth failed: { errmsg: "auth fails", ok: 0.0 }

$ mongoimport -h host.com:port -d dbname_test -u username -p

Gives this error:

no collection specified!

How to specify which collection to use? What should I use for -d? What I’d like to upload or what I want to use as test out there? I would like to import the full DB not only collection of it.

  • 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-05-26T16:19:34+00:00Added an answer on May 26, 2026 at 4:19 pm

    The counterpart to mongodump is mongorestore (and the counterpart to mongoimport is mongoexport) — the major difference is in the format of the files created and understood by the tools (dump and restore read and write BSON files; export and import deal with text file formats: JSON, CSV, TSV.

    If you’ve already run mongodump, you should have a directory named dump, with a subdirectory for each database that was dumped, and a file in those directories for each collection. You can then restore this with a command like:

    mongorestore -h host.com:port -d dbname_test -u username -p password dump/dbname/
    

    Assuming that you want to put the contents of the database dbname into a new database called dbname_test.

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

Sidebar

Related Questions

I have an object that can't be dumped by simplejson , so I need
I have successfully dumped an entire MySQL database using mysqldump --databases generating a nice
I've just been dumped into the middle of a SAP project and I need
I have a dict object. I dumped the data using this: for alldata in
I have tons of files dumped into a few different folders. I've tried organizing
I have a folder in which continuously new files are being dumped.In Java,what is
I have a load of images being pulled from Wordpress attachments and then dumped
I have these lines at the top of a MySQL .sql file (dumped with
I have a model for categories, which contains a circular foreign key. I dumped
I've dumped a MySQL database I have on my local MAMP server into a

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.