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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:14:28+00:00 2026-06-04T07:14:28+00:00

I am wondering what the community would most recommend for a problem I’m having

  • 0

I am wondering what the community would most recommend for a problem I’m having with setting up a sandbox environment for our team.

Currently, we use two separate MongoDB instances, both 3 member replica sets, for our test and deployment environment respectively. It’s pretty much understood internally that all the data in the test environment is largely throwaway and is just created by the developers in the course of unit testing the application.

I’d like to give the development team the new option of testing with the real live data, but in a separate safe sandbox instance. At first, I initially thought that I could just use the copyDatabase command to dupe the data nightly into a new database and connect the individual developer app servers to this database. The problem is that there is a ton of GridFS data in the system, and duplicating like this wastes a ton of disk i/o, and we’re running in smaller cloud instances.

I’m wary of going this route, especially if there is a better suited alternative.

Is it possible, for instance, to setup a fourth member of the deployment replica set that only ever operates as a slave, set all queries to slaveOkay = True and run tests against that individual node? Would this propagate back to the other members? How would inserts be handled?

What I am suggesting may be impractical, especially if the transfer had to cross the network where it would also waste network transfer. Has anyone ever had to solve a similar problem? 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-06-04T07:14:29+00:00Added an answer on June 4, 2026 at 7:14 am

    Slaves are only for reading. All writes must go to master. This rules out your “fourth slave” option.

    As for testing purposes, do you really need exact copy of the database, with all gridfs data? I’d try to copy only a relevant portion of “heavy” data. This rules out db.copyDatabase() 🙂 Do a mongodump / mongorestore instead.

    Also, I’d like to point out that test db and staging db should be different databases. Test db is used for unit tests (with mocked/generated data). Staging db is populated with production data and is used for integration/acceptance testing.

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

Sidebar

Related Questions

Wondering what is the best or most popular database client tool. Similar to Microsoft's
I'm wondering what the Stack Overflow community thinks when it comes to creating a
I was wondering if anyone knows of some good community distributed custom DDL templates
I just wanted to poll the community and see which plugins people are currently
I'm starting off a new web project and I'm wondering whether to use em
I would like to have an application/script that I could use to execute a
I'm currently researching new source control options for a team of 10 developers. We
Currently i'm developing most of my C++ Classes with the following structure and i
I'm wondering if it would be possible at all to transfer data between two
I just started to use ESENT ManagedInterface (http://managedesent.codeplex.com/). I am wondering whether it has

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.