Upgrading from Percona Server for MongoDB 7.0 to 8.0¶
Considerations¶
-
To upgrade Percona Server for MongoDB to version 8.0, you must be running version 7.0. Upgrades from earlier versions are not supported.
-
Before upgrading your production Percona Server for MongoDB deployments, test all your applications in a testing environment to make sure they are compatible with the new version. For more information, see Compatibility Changes in MongoDB 8.0
-
Enable Transparent Hugepages (THP) before starting Percona Server forMongoDB 8.0. THP is required to use the new TCMalloc version with MongoDB. For how to enable THP, see Enable Transparent Hugepages (THP) section of documentation.
-
If you are using data-at-rest-encryption with KMIP server, check the upgrade considerations
We recommend to upgrade Percona Server for MongoDB from official Percona repositories using percona-release
repository management tool and
the corresponding package manager for your system.
This document describes this method for the in-place upgrade (where your existing data and configuration files are preserved).
Prerequisites¶
Before the upgrade, do the following:
-
Make a full backup of your data and configuration files
-
In Percona Server for MongoDB 8.0, journaling is enabled by default. Both the
storage.journal.enabled
configuration option and the corresponding--journal
,--no-journal
command-line options are ignored. You receive the corresponding warning during the server start after the upgrade. To get rid of this warning, change your configuration to remove the journaling options.
-
Stop the
mongod
service:$ sudo systemctl stop mongod
-
Enable Percona repository for Percona Server for MongoDB 8.0:
$ sudo percona-release enable psmdb-80
-
Update the local cache:
$ sudo apt update
-
Remove the following configuration from the configuration file, if you have it:
processManagement: fork: true pidFilePath: /var/run/mongod.pid
-
Install Percona Server for MongoDB 8.0 packages:
$ sudo apt install percona-server-mongodb
-
Start the
mongod
instance:$ sudo systemctl start mongod
For more information, see Installing Percona Server for MongoDB on Debian and Ubuntu.
-
Stop the
mongod
service:$ sudo systemctl stop mongod
-
Enable Percona repository for Percona Server for MongoDB 8.0:
$ sudo percona-release enable psmdb-80
-
Remove the following configuration from the configuration file, if you have it:
processManagement: fork: true pidFilePath: /var/run/mongod.pid
-
Install Percona Server for MongoDB 8.0 packages:
$ sudo yum install percona-server-mongodb
-
Start the
mongod
instance:$ sudo systemctl start mongod
After the upgrade, Percona Server for MongoDB is started with the feature set of 7.0 version. Assuming that your applications are compatible with the new version, enable 8.0 version features. Run the following command against the admin
database:
> db.adminCommand( { setFeatureCompatibilityVersion: "8.0" } )
See also
MongoDB Documentation:
Get expert help¶
If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services.