Struggling with importing data via csv

Description

I am thrilled to be using RocketChat. Earlier I was using Mattermost but now I want to migrate all my data from Mattermost to RocketChat. I wanted to ask, how do I import all my data (i.e. users, channels, public channel, private channel, direct messages and group chats) from Mattermost to RocketChat. I tried to follow the steps provided here - [https://docs.rocket.chat/guides/administrator-guides/import/csv](https://RocketChat Docs). I was able to import data for Channels as well as Users but I am still struggling with importing messages. The data format provided in the above docs links for messages didn’t work for me.

While importing the data I get the message - Completed Successfully but when I check the channels, there are no messages in the channels. I even checked MongoDB, the new messages are not showing up there either. So I am sure that despite the notification, “Completed Successfully” shown by RocketChat the messages have not been imported.

Also looking at the logs makes no sense to me. Can someone please help me? If possible can someone please share a zip file containing sample csv files which can be used to import all data? Any help is much appreciated.

Server Setup Information

  • Version of Rocket.Chat Server: 3.7.1
  • Operating System: Linux
  • Number of Running Instances: 1
  • NodeJS Version: 12.18.3
  • MongoDB Version: 4.0.3

Any additional Information

how did you do to export the data from Mattermost i need to migrate from mattermost team édition too… Thnks

Hi @thierry, I assessed the Mattermost server database, which is MySQL and exported the entire database. This process can be done in 2 ways, you can log on to the Mattermost server and run commands to export the DB or you can connect to the Mattermost DB via a tool like MySQL Workbench. I used the MySQL Workbench approach.

I exported the entire database in all 3 formats i.e. CSV, JSON & SQL. I used Excel to arrange data according to my requirements.

As you can see the info in my initial question, I was able to successfully import the users and rooms (public and private) data into RocketChat via the csv import facility provided in RocketChat Administration. As of now I am still not able to import direct messages rooms and group chat rooms via csv import facility provided in RocketChat Administration. Also, I am not able to import messages via csv import facility provided in RocketChat Administration.

In order to get around this problem, I accessed the RocketChat DB, which is MongoDB, connected to MongoDB using the tool - Mongo Compass. Once inside MongoDB, I can import direct messages rooms and group chat rooms via JSON import. I can also do the same for messages, import via JSON import. The only trouble with this approach is that it is very laborious and prone to mistakes.

If you need any help, you can direct message me. Maybe we can chat and I can explain a bit more.

Cheers !