Navigation

Atlas Major Version Change Procedure

Atlas enables you to upgrade the major version of an Atlas cluster at any time by modifying the cluster.

This procedure guides you through creating a staging cluster for the purpose of testing your applications against the new MongoDB version. While optional, MongoDB strongly recommends using this procedure to ensure your production application experiences the smoothest possible transition to the new MongoDB version.

Note

Your cluster must be in a healthy state before you attempt to upgrade.

A. Log into your Atlas user account

Go to Atlas to log into your Atlas user account.

Important

The Atlas user you log in as must have the Project Owner role in the Atlas project that contains the cluster you want to upgrade.

B. Create an Atlas cluster for your staging environment

You can skip this step if you already have an Atlas cluster as your staging environment.

To open the cluster creation modal, click the Build a New Cluster button. Configure the staging cluster to match your production cluster. You do not have to enable backup for the staging cluster.

See Create a Cluster for documentation on creating a new Atlas cluster.

Important

If selecting a smaller Atlas instance size for the staging cluster, take into consideration that any performance tests run may not be representative of the performance of the upgraded production cluster. You may also need to select a larger storage size depending on the amount of data you want to mirror to your staging cluster.

C. Refresh the staging cluster with production cluster data

You can skip this step if you already have an up-to-date Atlas cluster as a staging environment.

If you have backups enabled for the production cluster, restore the most recent snapshot and choose the staging cluster as the destination.

If you do not have backups enabled for the production cluster, use Atlas Live Import to mirror data from your production cluster to the staging cluster. The live migration documentation includes specific instructions for creating staging environments.

D. Point your staging application at the staging cluster

Update your staging application to point at your staging cluster. For instructions on retrieving the MongoDB driver-friendly connection string for the staging cluster, see Connect via Driver.

Confirm that your application can connect successfully to the staging cluster and that the application operates as expected.

E. (Optional) Upgrade your application to the latest MongoDB drivers

Upgrading your application to the latest MongoDB drivers for your cluster’s MongoDB version enables full access to the features provided by the newer MongoDB version. You may also find better performance or stability with newer driver versions. See Connect via Driver for documentation on the recommended MongoDB driver for a given MongoDB version and connection examples.

If you encounter a bug after upgrading your application, file a ticket in the JIRA project for your MongoDB driver.

F. Update the staging cluster to the new major MongoDB version

  1. Click the ellipsis icon for your staging cluster to open the cluster modification modal.

  2. Select Edit Configuration.

  3. Change the cluster version to the desired major MongoDB Version.

    Important

    You cannot downgrade the MongoDB version of a Atlas cluster. If you want to redeploy the staging environment with the original MongoDB version, you must terminate and re-create the cluster.

  4. Click Confirm & Deploy to deploy your changes.

Atlas automatically begins upgrading the cluster. Consider measuring the time required by Atlas to upgrade the cluster to set a general expectation for your production cluster upgrade.

File a support ticket if you encounter version-specific issues with the upgraded staging cluster.

G. Test your application against the upgraded staging cluster

Perform any required performance and operational testing of the staging cluster.

File a support ticket if you encounter version-specific issues with the upgraded staging cluster.

Important

The major version upgrade requires at least one replica set election. Use the staging cluster as an opportunity to test your application’s resiliance to primary failover. See Test Failover for complete documentation.

H. Upgrade your production cluster to the target MongoDB version

Once you are confident in the performance and operation of your staging cluster, repeating the upgrade procedure for your production cluster.

Once Atlas completes the upgrade process, check that your production applications are still connected and operating normally.

If you upgraded your staging application with newer MongoDB drivers and are satisfied with the performance and operation, consider scheduling a maintenance period for upgrading your production applications.

File a High Priority support ticket if you encounter problems with the upgraded production cluster.

Support for major version upgrades

If you have any questions regarding migration support beyond what is covered in this documentation, or if you encounter an error during migration, please file a support ticket through the Atlas UI.

To file a support ticket,

  1. Click Support in the left-hand navigation.
  2. For Atlas Issue Category, select Other.
  3. For Priority, select Medium Priority. If the issue affects your production cluster, please select High Priority.
  4. For Request Summary, please include Major Version Upgrade in the summary.
  5. For More details, please include any other relevant details to your question or major version upgrade error.