Reputation: 6579
I have a mongodb standalone instance in my ubuntu. According to official docs I replace mongod binary then I restarted mongodb using sudo service mongodb restart
command, and restarted mongod binary also. Then when I check version using mongo --version
. It's still 2.4.10. But when I check mongod version it's 2.6.1. Is it okay? I installed mongodb in my local machine using this guide. If it correct then I will upgrade my production server.
Upvotes: 0
Views: 3264
Reputation: 65393
It sounds like you have upgraded your mongod
server to 2.6.1 but still have an older version of the mongo
shell in your path.
Technically that isn't a major issue for most usage as the older 2.4 shell can still connect and run common commands.
However, there are 2.6-specific shell helpers & features you'll be missing out on such as Bulk() operations and user management commands with user-defined roles.
If you have an open mongo
shell, you can check the versions of both the mongo
client and the mongod
server you are connected to.
Ideally the major versions should match, eg:
> version() // Version of the `mongo` shell
2.6.1
> db.version() // Version of the `mongod` server this shell has connected to
2.6.1
The upgrade guide you have followed is assuming you are not using the packaged versions of MongoDB -- the guidance here could definitely be improved.
A better (and typical) approach for Ubuntu is to install MongoDB using the standard packages: Install MongoDB on Ubuntu. This would allow you to get software updates via the normal apt-get
update process.
Upvotes: 3
Reputation: 116636
Yes. It's okay. The 2.6.1 version is a small update with bugfixes after version 2.6. But it's still the same major version.
Upvotes: 0