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

  • Home
  • SEARCH
  • 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 4057818
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:00:04+00:00 2026-05-20T15:00:04+00:00

May i know how do i merge my mongodb data files? The following is

  • 0

May i know how do i merge my mongodb data files?

The following is my current situation:

At /data/db:

drwxr-xr-x 3 root root      4096 2011-03-15 06:38 .
drwxr-xr-x 3 root root      4096 2011-03-15 00:35 ..
-rwxr-xr-x 1 root root         5 2011-03-15 06:54 mongod.lock
drwxr-xr-x 2 root root      4096 2011-03-15 00:43 social_scraper
-rw------- 1 root root  67108864 2011-03-15 06:39 social_scraper.0
-rw------- 1 root root 134217728 2011-03-15 06:38 social_scraper.1
-rw------- 1 root root  16777216 2011-03-15 06:39 social_scraper.ns

At /var/lib/mongodb :

drwxr-xr-x  5 mongodb mongodb      4096 2011-03-15 07:06 .
drwxr-xr-x 46 root    root         4096 2011-03-10 09:40 ..
-rwxr-xr-x  1 root    root            0 2011-03-15 07:06 mongod.lock
drwxr-xr-x  2 root    root         4096 2011-03-15 07:06 social_scraper
-rw-------  1 root    root     67108864 2011-03-15 07:06 social_scraper.0
-rw-------  1 root    root    134217728 2011-03-15 07:06 social_scraper.1
-rw-------  1 root    root     16777216 2011-03-15 07:06 social_scraper.ns

How do i merge all of the records into /data/db or /var/lib/mongodb ?

The above records ( in both directories ) have been restored using mongod --repair

It will be great if specific steps can be given as I am quite a newbie when it comes to MongoDB maintainence.

I’m using ubuntu 10.04 server edition, MongoDB v1.6.5.

Best Regards.

  • 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-20T15:00:05+00:00Added an answer on May 20, 2026 at 3:00 pm

    You can use mongodump to move files from first database in bson files, and than use mongoimport to import dumped files into another database:

    mongodump.exe --host localhost:27020 --db dbName
    
    mongorestore.exe --host localhost:27020 --db secondDBName folderWithBsonFiles
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We all may know the following snippet that gets the first entry of the
Does anyone know how to avoid merging certain files in a branch merge? For
In the following example, is there a way to know a merge happened? Looking
Those who know C++ may know what I mean by 'unity build': *.cpp files
You may know this recommendation from Microsoft about the use of exceptions in .NET:
You may know the scriptaculous SlideUp effect . Well, It slides up a div
As you may know, in VS 2008 ctrl + tab brings up a nifty
As you may know, Silverlight 3 doesn't support IMultiValueConverter and... I badly need it.
As some of you may know, use of the LIMIT keyword in MySQL does
As you may know, when we have this code in Javascript : function getName()

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.