Updating MongoDB 7.x to 8.0.0¶
Updating older versions
For details on updating earlier SEAL MongoDB versions, see the corresponding SEAL MongoDB documentation.
Overview¶
The following instructions include the update of both, single system and cluster.
The standard procedure is as follows:
-
Check the
featureCompatibilityVersionKey -
Update the database as described in the instructions below.
Your current
mongod.confconfiguration file will be renamedmongod.conf.bak.The database content will remain untouched.
-
In an editor compare the new
mongod.confconfiguration file tomongod.conf.bakand change the necessary settings.
Hint - replica set required
MongoDB requires a replica set for both, single server and server cluster.
Checking the featureCompatibilityVersion Key¶
-
Open a PowerShell (Administrator).
-
Connect to the primary host of the replica set (
localhostin a single server system):& "C:\Program Files\mongosh\mongosh.exe" --tls --tlsAllowInvalidCertificates --host <primary host> -
Check the
featureCompatibilityVersionkey:db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })The result should be similar to this:
{ featureCompatibilityVersion: { version: '7.0' }, ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1745505640, i: 1 }), signature: { hash: Binary.createFromBase64('AAAAAAAAAAAAAAAAAAAAAAAAAAA=', 0), keyId: Long('0') } }, operationTime: Timestamp({ t: 1745505640, i: 1 }) } -
If the result shows a version lower than 7.0, set the
featureCompatibilityVersionkey to7.0:db.adminCommand({ setFeatureCompatibilityVersion: '7.0', confirm: true })
Updating the Database¶
Hint - cluster
In a cluster, you have to perform every step of the following instructions on all cluster servers before going on to the next step.
-
Stop MongoDB:
Stop-Service -name seal-mongodb -Force -
Open a PowerShell (Administrator).
-
In a browser, log on to the SEAL Systems delivery platform with your logon data:
https://delivery.sealsystems.de
Hint - logon data
You receive the logon data from your Technical Project Manager at SEAL Systems.
-
Download the MongoDB - 8.0.1.220 - msi folder. It is saved as
MongoDB - 8.0.1.220 - msi.zip. -
Extract
MongoDB - 8.0.1.220 - msi.zip. -
In a PowerShell (Administrator), change to the
MongoDB - 8.0.1.220 - msidirectory and start installing the packages:Set-ExecutionPolicy Bypass -Scope Process -Force; .\install.ps1 -
Open the required firewall ports for necessary services:
Set-ExecutionPolicy Bypass -Scope Process -Force; .\firewall.ps1 -
Start MongoDB:
Start-Service -name seal-mongodb -
In an editor, open the
mongod.confconfiguration file and change the necessary settings. -
Restart MongoDB:
Restart-Service -name seal-mongodb -Force
Proceed with configuring a shared replica set.
Hint - replica set required
MongoDB requires a replica set for both, single server and server cluster.