I want to upgrade mongo from 4.4 to 5 to 6 and tried different ways, but none leads to success.
After the mongo update:
- apt upgrade mongo4->mongo5
- remove mongo 4 and install mongo 5
rocketchat won´t start anymore.
What is the best and preferred way to do this?
Server Setup Information
- Version of Rocket.Chat Server: 6.0.0
- Operating System: Debian 11
- Deployment Method: tar
- Number of Running Instances: 1
- DB Replicaset Oplog: yes
- NodeJS Version: 14.21.2
- MongoDB Version: 4.4.17
- Firewalls involved:
Hi, please refer to MongoDB’s official documentation for this.
Hi, did you forget re-initiate replica?
This is what I did:
- stop rocket.chat server
- backup mongo database
mongodump —out mongodump001
- backup /etc/mongod.conf
- purge old pkgs
sudo apt-get purge mongodb-org*
- delete old mongo files
sudo rm -rf /var/lib/mongodb
- install mongodb 5.x
remove old apt.source for 4.4
add new apt.source for 5.0
sudo apt-get update
sudo apt-get install mongodb-org
- restore /etc/mongod.conf
- restart mongo and check running
(if not, remove “fork: true” line)
- initiate rs01 replica
mongo -eval “printjson(rs.initiate())”
- restore mongo database
mongorestore mongodump001 —drop
- restart mongo
- start rocketchat server
- clear cookies for the server on browser
- connect to the server
I am not a mongo/rocketchat expert. So I am not sure if this is the best procedure.
somewhat later, but this saved my nerves.
many thanks, the rs.initiate was the solution…