Overview
In this section we will upgrade 4.0 to 4.2. For that we have to disable the monitoring during the upgrade. From 4.2 we can upgrade to 4.3 without downtime, but since it is 4.0 we need downtime.
https://docs.opsmanager.mongodb.com/current/tutorial/upgrade-ops-manager/
Preparation
We have to prepare first, as so:
- Backup the config files
- Upload the new Software
Of course we need the backup the old configuration before changing anything.
Backup Config files
Be sure to configure the following directories:
- <install_dir>/conf
- <install_dir>/logs
That will provide you the configuration files and the log files. You can backup the whole directory as follows:
Check where Mongo is installed
[root@dbpafxjrl ~]# rpm -qa | grep -i mongo mongodb-mms-automation-agent-manager-5.4.17.5525-1.x86_64 mongodb-enterprise-server-4.0.6-1.el7.x86_64 mongodb-enterprise-mongos-4.0.6-1.el7.x86_64 mongodb-enterprise-tools-4.0.6-1.el7.x86_64 mongodb-mms-4.0.9.50422.20190307T1523Z-1.x86_64 mongodb-enterprise-shell-4.0.6-1.el7.x86_64 [root@dbpafxjrl ~]# rpm -ql mongodb-mms-4.0.9.50422.20190307T1523Z-1.x86_64 /opt/mongodb/mms
We see that Mongo is installed from RPM in: “/opt/mongodb/mms”
Let's backup the whole folder:
[root@dbpafxjrl mongodb]# tar cvf /data/backup/mms.backup.tar /opt/mongodb/mms/ mms/ mms/MMS-MONGODB-MIB.txt mms/README mms/THIRD-PARTY-NOTICES mms/VERSION mms/agent/ mms/agent/automation/ ******************************************
Once we have a backup, let's continue with the upgrade
Upload the new binaries
The binaries can be downloaded from the link above or from |here. After you download the RPM, upload it to the software location on the server where you want to install it.
Upgrade
Stop the MongoOps manager
We have to stop the MongoOps manager as follows:
Stop MongoOps
[root@dbpafxjrl ~]# /opt/mongodb/mms/bin/mongodb-mms stop Stop Ops Manager server Instance 0 stopping Trying graceful shutdown..[ OK ] Stop Backup Daemon.........[ OK ] [root@dbpafxjrl ~]#
Upgrade the RPM
We can install the RPM as follows:
Check for dependencies & Upgrade RPM
[root@dbpafxjrl ~]# rpm -Uvh --test mongodb-mms-4.2.14.56911.20200603T2241Z-1.x86_64.rpm Preparing... ################################# [100%] [root@dbpafxjrl ~]# rpm -Uvh mongodb-mms-4.2.14.56911.20200603T2241Z-1.x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:mongodb-mms-4.2.14.56911.20200603################################# [ 50%] Cleaning up / removing... 2:mongodb-mms-4.0.9.50422.20190307T################################# [100%] [root@dbpafxjrl ~]#
Start MongoOps
Once we are done, we can start it again:
Start MongoOps
[root@dbpafxjrl conf]# /opt/mongodb/mms/bin/mongodb-mms start Starting pre-flight checks Successfully finished pre-flight checks Migrate Ops Manager data Running migrations...[ OK ] Starting Ops Manager server Instance 0 starting...................[ OK ] Starting pre-flight checks Successfully finished pre-flight checks Start Backup Daemon...[ OK ] [root@dbpafxjrl conf]#