Moving Database to new server running RocketChat in Docker container

Description

I have used a Quick install on DigitalOcean’s server to run RocketChat.
But now I want to move all my data to a new server running RocketChat in a Docker container.
I have made a mongodump and made a tar of it on my old server.

The Docker container on the new server is running fine as I can see the setup wizard.
I have used ssh to access the new server.
To get a bash shell on this container I used this command:
docker exec -it <container_id> /bin/bash

Where do I now unzip the backup and run mongorestore?

Server Setup Information

  • Version of Rocket.Chat Server: 2.4.2
  • Deployment Method: Docker
  • Platform: linux
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 8.17.0 – x64
  • MongoDB Version: 4.0.15

My bad.
I entered into the wrong container.
Using the command: “docker ps -a”, I see a list and status of all containers.

CONTAINER ID IMAGE
675b342808c0 rocketchat/hubot-rocketchat:latest
ad7b1cafb36c rocketchat/rocket.chat:latest
d1f4a1fa1c71 mongo:4.0

Instead of getting the bash shell on the container d1f4a1fa1c71 and doing a mongorestore, I was accessing ad7b1cafb36c.

After that all that was needed to do was bringing the backup.tar file to this new location, untaring it and doing a mongorestore.

That did it.

Although after logging in, everything (messages, channels) was restored except for all the configurations previously done on RocketChat on the old server.

1 Like