Rocket .Chat server running in Google Cloud vm machine. I want to upgrade the mongoDB version from 4.0 to 5.0. What is the best practice to do the upgrade? including taking backup, restore, etc…
All the available guides are either for docker or snap. There is no clear step by step guide for manual installation.
I would appreciate if someone can provide a step by step guide to do the upgrading.
Thank you for your response.
“You will also need to migrate from MMAPV1 to WiredTiger.” I am aware of this step I will have to do that first.
If mongo 5.0 has some incompatibilities issues I will upgrade to 4.4 for now and maybe later to 5.
Currently I am also thinking move to a cheaper server to host RocketChat, currently it is installed in a vm machine running in Google Cloud.
You have mentioned Docker/k8s however my previous installation was manual, how can I migrate to Docker is it easy thing to do?
Also If I moved to a new hosting server, I just need the backup of the mongo database from the current server right?
Great thank you for the information.
I will use Docket installation on the new server.
However I have a few more questions if you dont mind, my current version NodeJs 14.19.0 and MongoDB 4.0.10, RocketChat 4.8.1.
I am going to install the latest versions on the new server using Docket as you have suggested (it would be great if you could provide me with step by step guide on how to install Rocketchat with Docker)
Will there be any issue if I restore the database with mentioned versions into the new version?
Also when i did the dump on the server I did not use docker. This is how I did it mongodumb --out /backup.
Last but not least why Docker no Snap ?
You should not have any problems regarding versions and dependencies while using docker. It will isolate your environment and deliver all the necessary bits.
there is a nice step by step here:
With Docker (or Kubernetes) you have more control over the environment, and will not depend on host versions. Also, it’s easier to scale.
Snap is easy to install, but will be closely tied to the host you are running, while docker you can move your deployment without a lot of hassle.
Hi @dudanogueira thank you for the information.
The steps to install Rocket.Chat using Docker is clear and simple. I will install it in the new server.
One last thing I don`t how to approach it, since I have my monog backup in the old server.
What should I do in order to use the backup from the old server in the new server where I installed RocketChat using docker?
I hope I delivered my point clearly
Once you have the dump at hands, and have a new, clean, fresh install of Rocket.Chat using docker, with the same version from the dump (you can upgrade later) you need to restore the data into the docker mongo container.
Here you can have the steps for that:
After discovering the name of the mongo docker container:
docker exec -i <database_name> sh -c 'mongorestore --archive' < db.dump
Hi I have done the fresh install of Rokcet.Chat with same version of the old server.
However the database restore step still not clear to me. As you know I was not using docker there and the dump is created using mongodump --out mongobackup inside are those files