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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:37:17+00:00 2026-05-26T23:37:17+00:00

i was playing around on our dev server for a while for a new

  • 0

i was playing around on our dev server for a while for a new product and now it’s sorta live and i want to move existing data from a single machine (mongod, local) to our 6 server shard setup (2 shards each a 3 replica set) – is there any way to clone the db to a remote shard?

(worst case, a simple dump & insert with shard key example would be very nice!)

thanks!

  • 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-26T23:37:18+00:00Added an answer on May 26, 2026 at 11:37 pm

    You should add your dev server to the sharding environement :

    • Restart your dev server with the –shard option
    • on your mongos : type db.runCommand( { addshard : “serverhostname[:port]”, name : “migration” } );
    • use the remove shard command to remove your shard “migration”.
    • When it is done (you get “remove shard completed successfully”), you can stop your dev server and all your data have been migrated from dev to the new cluster

    You don’t have to shard your database for the migration, however you need to do it if you want to benefit from sharding.

    The advantages of this solution is that you have minimum action to take ( everything is automatic) and there is no downtime (the more load you put, however, the slower the operation is)
    However this is a slow solution (slower than a manual copy).

    One more advantage compared to raw files copy : the transfer will also compact (~ defrag) data, which is always good 🙂

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

Sidebar

Related Questions

I've been playing around with our question form for a while, and am having
Just playing around with the now released Silverlight 2.0. I'm trying to put a
While playing around with regexps in Scala I wrote something like this: scala> val
After playing around with haskell a bit I stumbled over this function: Prelude Data.Maclaurin>
So I've been playing around with pthreads, specifically trying to calculate the product of
I've been playing around with http://nixboxdesigns.com/projects/jquery-lavalamp/ for a navigation menu on a new site
Im new to this android development, and im currently playing around with the HelloM4A
We've been playing around with the new MonoTouch NUnit test project, which is quite
I'm currently playing around with the Microsoft.Web.Administration (MWA) namespace in order to adjust our
I am implementing the observer pattern for our application - currently playing around with

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.