We setup Rocket.Chat to the latest version 6.4.5.
Our old system is on version 5.4.10.
How can we export the database from the old version to the new one.
The content should include all users, teams, channels and direct messages with all conversations.
It’s possible. You can use mongodump to do that. The docs have a section for doing this on a Docker instance of Rocket Chat. I’ve found I sometimes needed to use mongorestore with the --drop command to completely destroy the existing database before importing the dump, but the instructions in the docs might work.
Are you importing the database into an instance at a new domain name? If so, this will be trickier if you’re storing images using GridFS, as the domain name is hardcoded in the database, and they’ll break when imported into the database at the new domain.
If you’re not storing images via GridFS and instead any of the other methods, and you’re not moving to a new domain name, that’s not something you need to worry about.
I have not tested it at all and don’t know if it still works. But you could use it as inspiration for your own script, at least; e.g. you wanted to fix the GridFS references and keep using GridFS. If you do end up using it…please report back!