- Download the latest release of mattermost-exporter for your platform and operating system.
On Linux and MacOS you might need to mark the downloaded file as executable:
chmod +x mattermost-exporter. - Get a personal access token from Mattermost.
- Create a file called
.envin the same folder you putmattermost-exporter, with the following content:
MATTERMOST_URL="https://matters.teamusec.de"
MATTERMOST_API_TOKEN="<the access token you just created>"-
Run
mattermost-exporter. If you encounter any errors while exporting your Mattermost data, please try to rerun the tool and see whether it throws the same error. Sometimes the tool runs into rate-limits, and just needs to restart. This will create a./datadirectory in your current folder. If you received messages after you've run this command, you can runmattermost-exporter --updateto just download posts in channels that had new posts since the last download, without having to download all posts and files in all channels again. -
Download mm-archive-viewer.html.
-
Open
mm-archive-viewer.htmlin your browser (tested with Chrome, but Firefox, Opera, etc. should work too). -
Click on
Select Your Archive, and choose the previously created./datadirectory. This will display all your channels and direct messages across all teams you previously had on Mattermost. -
If everything looks good, you can now delete
.envandmattermost-exporter. All you need in the future are./dataandmattermost-archive.html.
mattermost-exporter is the product of main.ts, which is compiled with Deno.
mm-archive-viewer.html is the product of a Vue application that is compiled to a single HTML page.
Have a look at the admin folder. You will find some scripts that might be helpful, e.g., to allow all users to create personal access tokens after you've enabled the feature on the server.