How to (easilly) get a fresh Rocket.Chat 4.8.0 docker-compose install with mongodb 5.0 & wiredtiger?

Since it seems like our current Rocket Chat server cannot be migrated from a native Debian installation to Docker-compose, I’d like to start fresh on a new server. Also due to the fact that more and more users cannot connect to the current server.

However it seems like I have to go through a lot of database / nmap->WiredTiger migration in order to do so.

So my question is:
Isn’t it possible to perform a quick & simple installation of the latest 4.8.0 Rocket.Chat with the latest database/engine without having to go through all those migrations?
If so, can someone please point me in the direction of “how-to”?

Hi!

The migration from nmap->wiredTiger is basically a dump and restore.

instead of just copying the mongo files around, you will restore it using the mongo tools for that.

So, for what you want, you can setup a rocketchat with wiredtiger, etc, backup the old one, and then restore it on the newer version.

Please, always do backups and test the migration process on a staging environment.

THanks!

@dudanogueira Thanks for the suggestion, but it didn’t work for me. I did a mongodump and mongorestore, but mongodb just kept on resetting on the new machine. And since the existing server seems to have issues, I though we start all over, to make sure all is good from scratch.

But it seems like we have to do the DB + Engine upgrades and cannot install it as latest versions?

I suggest:

  • Spin up a new rocketchat server, using docker, with the same version of your old server, with wiredtiger.
  • Dump the data off of the old server
  • Restore into the new server
  • Start migrating versions (never skip majors, like from 2.X → 4.x)

@dudanogueira I have finally come a bit further. Thank you so far :slight_smile:

Edit:
Found part of the problem. I’ve been testing using a VM & Photon 4 which, as it seems, only have a 16GB disk partition. I didn’t notice the import error due to lack of space :frowning:

So now it’s running 4.8.0 in Docker :slight_smile: :slight_smile:

Only things I noticed from the migration:

  1. 2FA was enabled for admin. It was not setup before, so I had to disable 2FA via environment variables
  2. All rooms but one have lost their international letters when browsing in Firefox and Edge, they are converted to ‘o’, ‘e’ etc and spaces are changed to ‘-’. I cannot change them again. Is this a breaking change in >4.3.1 versions?

Apart from that, it seems to work now :slight_smile:

Hi!

Glad to hear that.

For 1, you can override any settings using this technique:

regarding 2, not sure about it, but I don’t recall any changes on this. Does it happen only on those specific browser? Can you make sure the letters are as expected directly in Mongo?

Thanks!

Yes, I am very happy now. All clients across Android/iOS/Windows are able to login again :slight_smile:

In regards to international characters, it seems to vary quite a lot. This is regardless of iOS, Windows desktop, or browser, then the different rooms mix between the correct name and the changed non-international character name.

Can you check the value of:

ADMIN > LAYOUT > USER INTERFACE > Allow Special Characters in Room Names

This is the only setting I recall that could affect this behavior.

That is set to on.

Also found under General > UTF8:
UTF8 Channel Names Validation = ‘[0-9a-zA-Z-_.]+’ (Don’t dare to touch this :wink: )
UFT8 Names Slugify was ON, tried setting to OFF, but no change.

I can’t figure out what makes RC do the chance, it’s the same characters in different positions with/without e.g. space in between.

This is probably it.

Can you share an example of name you want to have?

I can run some tests here with a regex that will allow those names.

Have PM’ed you some examples from Windows client, Edge, Firefox & iOS app

great! I have answered back :slight_smile:

basically, adding the special characters at that regex.

@rocwee Hey Rocwee,

Did you have any issues in getting your configurations transferred to the new Instance of Rocket.Chat? I’ve been trying to get my test instance to mirror my main instance, but for some reason when I restore the DB to the test instance the configuration (Settings, LDAP, etc) dont transfer. All messages and channels/teams/users seem to work correctly, just not the settings.

just looking to see if I’m the only one!

@william.goodspeed No, everything seems to work fine, besides channel names + 2FA for admin/owner which was not enabled before, but after the transfer it was. Setting the environment variables as described by @dudanogueira fixed it.