Docs Home → Develop Applications → MongoDB Manual
Upgrade a Standalone to 3.6
On this page
Note
MongoDB 3.6 is not tested on APFS, the new filesystem in macOS 10.13 and may encounter errors.
Starting in MongoDB 3.6.13, MongoDB 3.6-series removes support for Ubuntu 16.04 PPCLE.
For earlier MongoDB Enterprise versions that support Ubuntu 16.04 POWER/PPC64LE:
Due to a lock elision bug present in older versions of the
glibc
package on Ubuntu 16.04 for POWER, you must upgrade theglibc
package to at leastglibc 2.23-0ubuntu5
before running MongoDB. Systems with older versions of theglibc
package will experience database server crashes and misbehavior due to random memory corruption, and are unsuitable for production deployments of MongoDB
The following steps outline the procedure to upgrade a standalone
mongod
from version 3.4 to 3.6.
Important
Before you attempt any upgrade, please familiarize yourself with the content of this document.
If you need guidance on upgrading to 3.6, MongoDB offers major version upgrade services to help ensure a smooth transition without interruption to your MongoDB application.
Upgrade Recommendations and Checklists
When upgrading, consider the following:
Upgrade Version Path
To upgrade an existing MongoDB deployment to 3.6, you must be running a 3.4-series release.
To upgrade from a version earlier than the 3.4-series, you must successively upgrade major releases until you have upgraded to 3.4-series. For example, if you are running a 3.2-series, you must upgrade first to 3.4 before you can upgrade to 3.6.
Check Driver Compatibility
Before you upgrade MongoDB, check that you're using a MongoDB 3.6-compatible driver. Consult the driver documentation for your specific driver to verify compatibility with MongoDB 3.6.
Upgraded deployments that run on incompatible drivers might encounter unexpected or undefined behavior.
Preparedness
Before beginning your upgrade, see the Compatibility Changes in MongoDB 3.6 document to ensure that your applications and deployments are compatible with MongoDB 3.6. Resolve the incompatibilities in your deployment before starting the upgrade.
Before upgrading MongoDB, always test your application in a staging environment before deploying the upgrade to your production environment.
Downgrade Consideration
Once upgraded to 3.6, if you need to downgrade, we recommend downgrading to the latest patch release of 3.4.
Default Bind to Localhost
Starting in MongoDB 3.6, mongod
and mongos
instances bind to localhost by default. Remote clients cannot connect
to an instance bound only to localhost. To override and bind to other
ip addresses, use the net.bindIp
configuration file setting
or the --bind_ip
command-line option to specify a list of ip
addresses.
The upgrade process will require that you specify the
net.bindIp
setting if you wish remote clients to connect to
your instance.
Warning
Before binding to a non-localhost (e.g. publicly accessible) IP address, ensure you have secured your cluster from unauthorized access. For a complete list of security recommendations, see Security Checklist. At minimum, consider enabling authentication and hardening network infrastructure.
For more information, see Localhost Binding Compatibility Changes.
Prerequisites
The 3.4 instance must have featureCompatibilityVersion
set
to 3.4
. To check featureCompatibilityVersion
:
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
The operation should return a result that includes
"featureCompatibilityVersion": "3.4"
.
To set or update featureCompatibilityVersion
, run the following
command:
db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )
For more information, see setFeatureCompatibilityVersion
.
Download 3.6 Binaries
Via Package Manager
If you installed MongoDB from the MongoDB apt
, yum
, dnf
, or
zypper
repositories, you should upgrade to 3.6 using your package
manager.
Follow the appropriate 3.6 installation instructions for your Linux system. This will involve adding a repository for the new release, then performing the actual upgrade process.
Manually
If you have not installed MongoDB using a package manager, you can manually download the MongoDB binaries from the MongoDB Download Center.
See 3.6 installation instructions for more information.
Upgrade Process
Replace existing 3.4 binaries with the 3.6 binaries.
Shut down your mongod
instance. Replace the existing
binary with the 3.6 mongod
binary.
Restart mongod
. If you wish remote clients to connect to
the mongod
instance, you must specify --bind_ip
(or
the net.bindIp
setting). For more information, see
Localhost Binding Compatibility Changes.
Enable backwards-incompatible 3.6 features.
At this point, you can run the 3.6 binaries without the 3.6 features that are incompatible with 3.4.
To enable these 3.6 features, set the feature compatibility
version (FCV
) to 3.6.
Tip
Enabling these backwards-incompatible features can complicate the downgrade process since you must remove any persisted backwards-incompatible features before you downgrade.
It is recommended that after upgrading, you allow your deployment to run without enabling these features for a burn-in period to ensure the likelihood of downgrade is minimal. When you are confident that the likelihood of downgrade is minimal, enable these features.
Run the setFeatureCompatibilityVersion
command against the admin
database:
db.adminCommand( { setFeatureCompatibilityVersion: "3.6" } )
This command must perform writes to an internal system collection. If for any reason the command does not complete successfully, you can safely retry the command as the operation is idempotent.
Additional Upgrade Procedures
To upgrade a replica set, see Upgrade a Replica Set to 3.6.
To upgrade a sharded cluster, see Upgrade a Sharded Cluster to 3.6.