Import from Slack / mmetl finds no posts

Hello,

I’m trying to migrate from Slack to MM. Since I don’t have admin rights in this Slack Team I used https://github.com/rusq/slackdump. The tool works as expected and gave me a structured zip Archive, where I can see the channels, users, conversations and so on.

When I try to transform this with mmetl, the channels and users are found and can be imported. Sadly the tool doesn’t seem to find the posts in the channels and with mmetl check slack I get multiple messages like

Channel: “allgemein” Type: “O” Post count: 0 Members: “”

Blockquote

In the exported archive I can see Files like

allgemein\2022-02-11.json

which contains the messages from that day and channel.

Is there something I’m doing wrong?

David

Hi David and welcome to the Mattermost forums!

I think mmetl requires a specific folder structure. Using the slack export you can download from their website, an example archive looks like this (small demo setup of mine):

zufällig/
zufällig/2022-08-11.json
export/
export/2022-08-11.json
testchannel1/
testchannel1/2022-08-11.json
testchannel2/
testchannel2/2022-08-11.json
users.json
allgemein/
allgemein/2022-08-11.json
integration_logs.json
channels.json

The channels.json then contains the channelnames and the tool is looking for json files in the folders called like the channelnames in the channels.json.
Can you verify that your structure looks exactly like this?

And also with regards to the format: Here’s an example of my channels.json which describes the channel allgemein:

{
    "id": "C03TDG5P39R",
    "name": "allgemein",
    "created": 1660275891,
    "creator": "U03TG3CS7MJ",
    "is_archived": false,
    "is_general": true,
    "members": [
        "U03TG3CS7MJ"
    ],
    "topic": {
        "value": "",
        "creator": "",
        "last_set": 0
    },
    "purpose": {
        "value": "Dies ist der eine Channel, der immer alle einbezieht. Es ist ein toller Ort für Mitteilungen und Team-weite Unterhaltungen.",
        "creator": "U03TG3CS7MJ",
        "last_set": 1660275891
    }
},

And looking at the allgemein/2022-08-11.json file in my dump, this is what an example entry looks like:

[
    {
        "type": "message",
        "subtype": "channel_join",
        "ts": "1660275891.863739",
        "user": "U03TG3CS7MJ",
        "text": "<@U03TG3CS7MJ> ist dem Channel beigetreten"
    }
]

Can you confirm the structure for the files in the ZIP as well as the JSON in the files?

Hey Alexander,

I already suspected this and after putting everything in the right structure the import worked flawlessly.
Thank you for your help.

David

Awesome, thanks for the feedback - marking this as resolved then.

Hi @dau.mensch.raube ,

I’m slackdump dev.

Could you please let me know if something was wrong slackdump export file that you needed to modify to make the mmetl work? (And if YES, then what steps did you take?).

I’m interested, so that I could address that so that others won’t be having the same problem in the future.

Hey @rusq,

yeah the exported zip did not contain the folders for the channels, just the json files with channel\ in the filename. Solution was to not use the inbuilt export to zip function but to export it to a folder and then zip it afterwards. I tried it again recently and miraculously it worked as it should. So probably I did something dumb in the beginning.

My first dump:

vmware/
vmware/2019-12-05.json
vmware/2020-05-19.json
vmware/2020-10-09.json
vmware/2022-06-28.json
vmware/2022-08-09.json

the one i did recently:

vmware\2020-05-19.json
vmware\2020-10-09.json
vmware\2022-06-28.json
vmware\2022-08-09.json
vmware\2019-12-05.json

David

Thanks David, that’s helpful. Looks like ZIP file on Windows needs attention. I’m glad that you got it sorted, sorry for the inconvenience.

This issue is fixed in slackdump in versions v2.2.2+, should anyone stumble on this in the future.

Awesome, many thanks @rusq !