0

MonogDB's dynamic schema has made me thinking about replacing MySQL. I eventually want to use MongoDB as the default for all new app developments.

  • But this project runs on only 1 dedicated server (with 2 hard drives).

Docs about "MongoDB for production" recommends multiple servers. This makes me wonder if MongoDB is only suited for large commercial projects?

Anyways... I am wondering if the live database data can be replicated to the second hard drive as a replica of the original data (to recover from any data corruption on the primary).

I did take a look at mongodump, but I am wondering if there is anything more realtime like the replica set.

Currently my server backs up everything to the second hard drive & rsync is scheduled to sync everything in this drive to a remote machine.

Any thoughts against the use of MongoDB in a single server environment is also appreciated. The database size is around 7GB.

Thanks

1 Answer 1

1

Replication in MongoDb is a simple process to setup and I configured it locally during an online course I completed via the 10gen website, obviously this will fail over without an issue to your other instance but depending upon what fails on your machine will it be of any use!

I'd advise working your way through the free course they have it as it will solve 90% of the queries you will have with evaluating the product (replica sets are part of this)

We had it my old company and did run it on several machines for full redundancy and automatic failover to another node, you'll need a witness too.

2
  • Thanks! Can I assume that local replication is configured like setting up a remote replica set?
    – Jsp
    Commented Jan 9, 2014 at 17:10
  • yes, you just need to run the second mongod on a different port with different dbpath. You will also need to set up appropriate voting/priority to make sure that you don't lose the primary in the case where secondary mongod dies for some reason. Commented Jan 13, 2014 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.