Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question

1 Answer 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.

share|improve this answer
    
Thanks! Can I assume that local replication is configured like setting up a remote replica set? –  JoshG Jan 9 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. –  Asya Kamsky Jan 13 at 17:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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