General Mongo update assistance


Currently my RocketChat 4.5.1 is still running on MongoDB 4.2.17 wiredTiger, but the feature compatibility version says its 4.0.
Rocket Chat says MongoDB version 4.0.27 is deprecated, please upgrade your installation.

My general question is:
Can’t I just dump the “parties” database…
(I have a local: 14GB and a parties: 9GB (the actual Rocket Chat data it seems, I dont know what that local is supposed to be…))
…and install mongo 5.x and import the dump?
Would that work?
Or should I just set the feature compatibility to 4.2 to postpone it for a bit?

Server Setup Information

  • Version of Rocket.Chat Server: 4.5.1
  • Operating System: Ubuntu 18.x
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog: enabled
  • NodeJS Version: 14.18.3
  • MongoDB Version: 4.2.17
  • Proxy: nginx
  • Firewalls involved: iptables


As this is more of a mongo topic please consider this information:

Rocket.Chat will work with the following Mongo versions:

It should be ultimately a matter of dumping and restoring your data.

If your uploads are in GridFS that’s enough.
Otherwise you should copy the upload folder you can set up in Rocket.Chat to the new server.

One suggestion is to always use docker instead of snap.

Thank you for the reply,
I have tested porting my instance of RocketChat to a Docker container with actual useful results on two test machines.
But Docker seems to add a whole bunch of IPTABLES rules to my ruleset which I dont really like.
There’s already quite a ruleset on my server for certain services.

Why I’m asking here in the first place was; maybe RocketChat uses sole special database calls that might break if I just dump my DB, install MongoDB5.x and import the dump there.
And people here might have an advise.
I’ve had some bad memories with MongoDB and RocketChat in the past where the DB didnt come back up.

So I have tested dumping the current database,
edited the default docker-compose.yml to have mongo:latest (instead of the suggested 4.0 that has in its official tutorial) and had to change from mmapi1 to wiredTiger.
Other than toying around a bit it seems to have worked.
Odd thing is it didn’t carry over my custom CSS scripts properly, my custom assets also didn’t carry over and I had to re-edit the “content” and so on under layout settings.

If anyone reads that in the future, it works.

1 Like