MongoDB backup not working properly


Ok so, I created a rocket chat server and set up all the necessary information (channels, users, custom css…etc), I followed the documentation to create a backup of this mongoDB database container and dump into another MongoDB container (for testing)
here are the commands I used, the backup container is called “db” and the one i want to dump the data into is named “mongo”.

docker exec db sh -c “mongodump --archive” > db.dump
docker exec -i mongo sh -c “mongorestore --archive” < db.dump
So far so good, the operation was successful as the command, as confirmed by the logs

the problem is when i try running a rocket chat container that uses the second mongo container

Expected behavior

when running the rocket chat container, I should be able to at least login with the users stored previous database

Actual behavior

The rocket chat container behaves as if I’m running it for the first time, taking me to the setup wizard.

Server Setup Information

  • Version of Rocket.Chat Server: 5.2.0
  • Operating System: windows 10 pro
  • Deployment Method: docker
  • Number of Running Instances: 2
  • DB Replicaset Oplog: enabled
  • NodeJS Version: 14.19.3
  • MongoDB Version: 4.4
  • Firewalls involved: none

If you are using a web browser as a client connecting to the server, try clearing cookies.

I had a similar experience when I was maintenancing the server and database.
Once the environment fails to build, the server sends a wizard screen to register a new site.
Even if you successfully accomplish this by revising the maintenance method, the server will try to resume the wizard screen from the point of interruption.
When I deleted the cookies as a test, the login screen to the restored workspace appeared.
I think this is an area for improvement.
(machine translated)