[Solved] Migration to Mattermost Cloud – Exporting Messages Without Attachments While Keeping Attachment Links

Hello everyone,

I have a local Mattermost server (version 7.8.0) with file storage on Amazon S3 (~250GB). I want to migrate to VPS server Mattermost (version 10.6) and I’m using mmctl for the export/import process.

My goal is to export only the messages, channels, etc., without transferring the attached files (which remain on S3). To do this, I used the command:

mmctl export create --no-attachments

The export runs correctly and the messages and channels are present in the export file. However, when I perform the import via mmctl on the vps server, although the messages and channels are imported, the links to the attached files are missing.

I’d also like to specify that the file storage settings on the vps server are configured to use Amazon S3.
Has anyone encountered this issue? Is there a way to export only the messages while retaining the attachment links (i.e., keeping the attachment metadata) without transferring the files themselves? Any help or pointers would be greatly appreciated.

Thanks in advance for your feedback!

1 Like

There can be schema differences between such gapped versions. I’d suggest updating your local instance first… 7.8 is an ESR (and you could have updated to 7.8.15 during your product life!) so go to 8.1.13, then 9.5.13, then 9.11.10, then 10.5.2 (and then 10.6.x if you want to be on the leading edge) It’s quite likely that’ll resolve your issue.

Hello everyone — thanks again for all your help!

I finally solved it using mysqldump:

Old server:

mysqldump -u <username> -p <databasename> > mattermost.sql

New server:

mysql -u <username> -p <databasename> < mattermost.sql

Thanks!
Fred

1 Like