Switching on Amazon S3 on an established server

Hi Everyone,
First post to this forum so please be gentle :slight_smile:
We run a small MM server for our local Amateur radio group of about 20 people. we run it on a Digital Ocean Droplet with about 25GB of storage place and it has been running (with the occasional upgrade) happily since 2017. I am currently on version 5.34.

We’re starting to run a little low on internal storage and we are considering switching on an S3 service, as it looks very cost effective for what we need it to do.

My question is this: upon switching it on, does MM take the pre-existing ./data files and move them over to S3? Maybe it leaves the ./data files where they are and starts using the S3 bucket. I am not sure.

I am trying to understand the behaviour of MM when switching this feature on so there are no surprises :slight_smile:
Lastly, is there anything I need to do to the Digital Ocean Droplet before I turn on S3 via MM?

Thanks, Everyone.

Hello @GeneInTheUK - You would need to move over all the files in ./data over to the S3 bucket. And then point Mattermost to it.

There is nothing else to do in the droplet itself.

Hi @agnivade

Thanks for this.

What folder will mattermost be expecting in the S3 bucket? Will it still be /data in the root of the bucket or do I need to create a different folder structure.

Please accept my apologies for my ignorance on how S3s work. I am still learning. Thanks.


The contents has to be under bucket + path prefix. If you don’t specify any path prefix, then you can just copy over all the contents under “data” to the bucket, and just specify the bucket path.

For more details, see here: Configuration Settings — Mattermost documentation

should we run any migration process? I’m asking because I can’t see my files copied to bucket using prefix and properly configuration. New ones create correctly, but old is absent on UI and exists in the bucket. Maybe paths in DB or permissions, hashes, etc?

I had
./data local storage
created Bucket my-data with prefix mm
mount mm via s3fs and copied into mm all from data (all content from data I see in mm)
restarted service, changed configuration - works.

But I see only new uploaded files