I'm using MongoDB 2.6 wherein the docs clearly state the config file is YAML.
When I go to open my config, /etc/mongod.conf, it looks like this one in the github repo (which is also MongoDB 2.6)
What gives, and how do I configure my server when the docs don't match the deployed default config, at all?
File FormatMongoDB configuration files use the YAML format [1].
The MongoDB configuration file provides MongoDB database admins with numerous options and settings for controlling the operation of the database system. A MongoDB configuration file can be used to configure mongod and mongos instances at startup.
Well, the new format is YAML, but 2.6 still supports the old format:
The 2.4 configuration file format remains for backward compatibility.
You can find documentation on the old format here and as you have discovered, there are far more examples out there of the old format then on the new YAML based one. I'm not aware of anything that you can do in the new format that you can't do in the old. And I'm aware of a number of people struggling to configure the new YAML format due to few examples being available and the touchiness of the new format to spacing/tabs/etc.
Personally I'm still using the old format and will continue to do so until I see a compelling reason to switch.
Here's the docs on the old format:
http://docs.mongodb.org/v2.4/reference/configuration-options/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With