Upgrade from Percona Server for MongoDB 8.0 to 9.0¶
Considerations¶
-
Upgrade Percona Server for MongoDB 8.0 deployments to 9.0. For earlier major versions, upgrade to 8.0 first.
-
Test your applications with 9.0 before you upgrade production deployments. Review MongoDB 9.0 compatibility changes.
-
Enable Transparent Hugepages (THP) before you start Percona Server for MongoDB 9.0. See Enable THP.
-
For data-at-rest encryption with a KMIP server, check the upgrade considerations.
-
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:
-
Make a full backup of your data and configuration files
-
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.
-
Stop the
mongodservice:sudo systemctl stop mongod -
Enable Percona repository for Percona Server for MongoDB 9.0:
sudo percona-release enable psmdb-90 -
Update the local cache:
sudo apt update -
Remove these
processManagementoptions from your configuration file when present:processManagement: fork: true pidFilePath: /var/run/mongod.pid -
Install Percona Server for MongoDB 9.0 packages:
sudo apt install percona-server-mongodb -
Start the
mongodinstance:sudo systemctl start mongod
For more information, see Installing Percona Server for MongoDB on Debian and Ubuntu.
-
Stop the
mongodservice:sudo systemctl stop mongod -
Enable Percona repository for Percona Server for MongoDB 9.0:
sudo percona-release enable psmdb-90 -
Remove these
processManagementoptions from your configuration file when present:processManagement: fork: true pidFilePath: /var/run/mongod.pid -
Install Percona Server for MongoDB 9.0 packages:
sudo yum install percona-server-mongodb -
Start the
mongodinstance: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: