Skip to content

Rate this page
☆ ☆ ☆ ☆ ☆
Thanks for your feedback
Thank you! The feedback has been submitted.

Get free database assistance or contact our experts for personalized support.

Upgrade from Percona Server for MongoDB 8.0 to 9.0

Considerations

  1. Upgrade Percona Server for MongoDB 8.0 deployments to 9.0. For earlier major versions, upgrade to 8.0 first.

  2. Test your applications with 9.0 before you upgrade production deployments. Review MongoDB 9.0 compatibility changes.

  3. Enable Transparent Hugepages (THP) before you start Percona Server for MongoDB 9.0. See Enable THP.

  4. For data-at-rest encryption with a KMIP server, check the upgrade considerations.

  5. If you run Amazon Linux 2023, consider the following:

    We build and test Percona Server for MongoDB only on the latest versions of Amazon Linux 2023. Because of the way Amazon Linux updates their libraries, Percona Server for MongoDB works only on specific Amazon Linux versions.

    The following table records compatibility for earlier 8.0 releases. Do not use these rows to select an Amazon Linux version for a 9.0 deployment. Check the supported platforms before you install or upgrade.

    Percona Server for MongoDB version Amazon Linux 2023 version
    8.0.4-2 2023.6.x and older
    8.0.8-3 2023.7.x and newer

    To upgrade Percona Server for MongoDB, make sure that you run a compatible version of Amazon Linux 2023. Use the update instructions to update the operating system.

Use the official Percona repositories and your operating system package manager for the upgrade. Manage the repositories with percona-release.

The package commands apply to standalone deployments. For replica sets and sharded clusters, follow the corresponding upstream upgrade procedure. Preserve your data and configuration files during the upgrade.

Prerequisites

Before the upgrade, do the following:

  1. Make a full backup of your data and configuration files

  2. Verify that your deployment uses feature compatibility version (FCV) 8.0:

    db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })
    

    Resolve an incomplete 8.0 upgrade before you install 9.0 binaries.

  1. Stop the mongod service:

    sudo systemctl stop mongod
    
  2. Enable Percona repository for Percona Server for MongoDB 9.0:

    sudo percona-release enable psmdb-90
    
  3. Update the local cache:

    sudo apt update
    
  4. Remove these processManagement options from your configuration file when present:

    processManagement:
       fork: true
       pidFilePath: /var/run/mongod.pid
    
  5. Install Percona Server for MongoDB 9.0 packages:

    sudo apt install percona-server-mongodb
    
  6. Start the mongod instance:

    sudo systemctl start mongod
    

For more information, see Installing Percona Server for MongoDB on Debian and Ubuntu.

  1. Stop the mongod service:

    sudo systemctl stop mongod
    
  2. Enable Percona repository for Percona Server for MongoDB 9.0:

    sudo percona-release enable psmdb-90
    
  3. Remove these processManagement options from your configuration file when present:

    processManagement:
       fork: true
       pidFilePath: /var/run/mongod.pid
    
  4. Install Percona Server for MongoDB 9.0 packages:

    sudo yum install percona-server-mongodb
    
  5. Start the mongod instance:

    sudo systemctl start mongod
    

Retain FCV 8.0 while you test the upgraded deployment. To enable 9.0 features after you finish the tests, run this command against the admin database:

db.adminCommand( { setFeatureCompatibilityVersion: "9.0", confirm: true } )

See also

MongoDB documentation: