Hi everyone and thanks for this amazing tool!
I have been trying to migrate from Slack to self-hosted mattermost on Ubuntu 20.04 with Mysql server v8.0 and apache. A fresh mattermost installation is found in /var/www/mattermost
So far I have tried lot of things without success at all and I decided to retire, but this post gave me some clues and I re-opened.
Important 1 The Slack import file is quite small (14 MB), with some attachments. It has just 6 users and 3 channels.
In summary what I have done is:
-
Export the Slack workspace following slack instructions, yielding the starting zip file (let’s call it startingFile.zip)
-
Create the Slack bot and use slack advanced exporter following official guide:
wget https://github.com/grundleborg/slack-advanced-exporter/releases/download/v0.4.0/slack-advanced-exporter.linux-amd64.tar.gz
tar -xvzf slack-advanced-exporter.linux-amd64.tar.gz
./slack-advanced-exporter --input-archive startingFile.zip --output-archive isabelBioinfoHub-with-emails.zip fetch-emails --api-token xoxb-25062577487410374518-xUHGPutC9oT494FGSRnts
./slack-advanced-exporter --input-archive isabelBioinfoHub-with-emails.zip --output-archive isabelBioinfoHub-with-emails-and-attachments.zip fetch-attachments
- Use the latest version of mmetl to transform the slack export into mattermost import:
git clone https://github.com/mattermost/mmetl
cd mmetl
go build #go is installed and in the path, to build the mmetl binary
cd .. # to go back to the folder where zipfiles are
./mmetl transform slack --team Neuromol --file isabelBionfoHub-export-with-attachments.zip --output isabelBioinfo-mattermost-import.jsonl
zip -r isabelBioinfoHub-mattermost-import.zip data isabelBioinfoHub-mattermost-import.jsonl
This creates a zip file with the .jsonl and the directory(ies) data/bulk-export-attachments
- I use the mmctl-beta version provided in this post to first validate the zip file to upload and import.
wget 'https://community.mattermost.com/files/fiinwbxwppg68eftofwd5fw3hw/public?h=APwtyR_jhvepkzH8b0j-REDcX4cwkLGKyM48d0Xehh8' -O mmctl-beta.zip
unzip mmctl-beta.zip
mv mmctl mmctl-beta # rename the binary so that it has no problems with original mmctl
cp mmctl-beta /var/www/mattermost/bin
- Finally, I try to import the data, first validating the zip, then uploading and finally processing it using mmctl-beta (I have also tried with original mmctl). Note that the team Neuromol is created using the browser:
cd /var/www/mattermost
bin/mmctl auth login #to log in, using local-server and the system admin user created
bin/mmctl-beta import validate ~/isabelBioinfoHub-mattermost-import.zip --team Neuromol
# it yields no errors, see screenshot
bin/mmctl-beta import upload ~/isabelBioinfoHub-mattermost-import.zip #all ok
bin/mmctl-beta import process 5q97wa3ecb8mxfdie96zhr4gta_isabelBioinfoHub-mattermost-import.zip
I have the mattermost server session in an other terminal to debug, I have started the service like this:
sudo -u mattermost bin/mattermost # in port 8064 in this instance, with an apache proxy
And the instance get aborted, stopping and when I re-start the instance, the import process is stucked. Here I post a log of the mattermost instance:
Then from another terminal, I run
bin/mmctl-beta import process 5q97wa3ecb8mxfdie96zhr4gta_isabelBioinfoHub-mattermost-import.zip # import log successfully created
And I link the long log here
Thank you very much in advance and sorry for bothering, but I have not been able to figure out myself.