tom.ohare (3) [Avatar] Offline
#1
Hi,

I wanted to suggest including a section or chapter or appendix on best practices for MongoDB administration.

I know that 10gen have a Best Practices PDF which is very helpful but there are still some areas that could be clearer. For example, maintenance/upgrade of servers in a replica set can be performed by removing secondaries from the set one by one, stopping mongod and then adding them back to the set after upgrade. Finally, the primary can be upgraded by stepping it down and then performing the same procedure as for a secondary.

OK, that's the overall procedure but it's not 100% clear to me what the recommended technique for shutting down a mongod is. The MongoDB documentation suggests using db.shutdownServer() but I'm sure I've seen a video from education.mongodb.com where kill process-id was recommended.

Another very simple example is how to safely stop mongod - this was something I struggled with at the end of my very first MongoDB session and, believe me, it took quite a bit of searching to running db.shutdownServer() from the admin database.

I really believe that a section listing best practices for starting, stopping, recovering/reconfiguring, backing up a MongoDB configuration would be very useful for a lot of people.

What do you think?
ariogoke (8) [Avatar] Offline
#2
Re: Suggested Section/Chapter - Best Practices
tom.ohare,

Thanks for sharing! I was wondering about how to stop the server. I will experiment.

I found that -- after connecting to the server by navigating to
"C:users<username>downloadsmongodb-win32-x86_64-2.4.9in" directory and typing "mongo.exe" -- I can disconnect from the server by typing "quit()" at the ">" prompt.

(I am using MongoDB on a 64-bit machine running Windows 7 Pro.)