Search code examples
importslackmattermost

Multiple imports from Slack to Mattermost duplicates posts


When you export your history from Slack you get a .zip file. You can import this into Mattermost to aid your move from one to the other.

My problem is because we haven't paid for Slack I can't export our history in one go. I have an old .zip file containing our Slack history from the previous few years and I can generate a new one for the latest history. But if I import the old one followed by the new one any posts that exist in both are duplicated.

Is there some way of handling this in Mattermost? Can I merge the .zip files before I do the import? Or do we just have to live with it?


Solution

  • Unfortunately, Mattermost doesn't have any way of handling the duplicate posts at the moment.

    If you don't mind writing a script though, this can be fixed relatively easily - you would just need to work through every row in the Posts table of your Mattermost database, and check if there are any other rows with exact same UserId, ChannelId, CreateAt and Message fields, and if so, delete those rows.