# Switching on Amazon S3 on an established server

**URL:** <https://forum.mattermost.com/t/switching-on-amazon-s3-on-an-established-server/12330>\
**Category:** Troubleshooting\
**Created:** [October 15, 2021, 2:52pm UTC](https://forum.mattermost.com/t/switching-on-amazon-s3-on-an-established-server/12330 "2021-10-15T14:52:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeneInTheUK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/geneintheuk/32/5126_2.png) [@GeneInTheUK](https://forum.mattermost.com/u/GeneInTheUK)\
**Post date:** [October 15, 2021, 2:52pm UTC](https://forum.mattermost.com/t/switching-on-amazon-s3-on-an-established-server/12330/1 "2021-10-15T14:52:37Z")

</div>

Hi Everyone,  
First post to this forum so please be gentle 🙂  
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 🙂  
Lastly, is there anything I need to do to the Digital Ocean Droplet before I turn on S3 via MM?

Thanks, Everyone.  
Gene

---

<div class="post-metadata">

**Author:** ![agnivade](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agnivade/32/3846_2.png) [@agnivade](https://forum.mattermost.com/u/agnivade)\
**Post date:** [October 16, 2021, 4:29am UTC](https://forum.mattermost.com/t/switching-on-amazon-s3-on-an-established-server/12330/2 "2021-10-16T04:29:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![GeneInTheUK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/geneintheuk/32/5126_2.png) [@GeneInTheUK](https://forum.mattermost.com/u/GeneInTheUK)\
**Post date:** [October 16, 2021, 7:02am UTC](https://forum.mattermost.com/t/switching-on-amazon-s3-on-an-established-server/12330/3 "2021-10-16T07:02:50Z")

</div>

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.

Gene

---

<div class="post-metadata">

**Author:** ![agnivade](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agnivade/32/3846_2.png) [@agnivade](https://forum.mattermost.com/u/agnivade)\
**Post date:** [October 17, 2021, 4:02pm UTC](https://forum.mattermost.com/t/switching-on-amazon-s3-on-an-established-server/12330/4 "2021-10-17T16:02:27Z")

</div>

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](https://docs.mattermost.com/configure/configuration-settings.html#file-storage-system)

---

<div class="post-metadata">

**Author:** ![mmospanenko](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/mmospanenko/32/5846_2.png) [@mmospanenko](https://forum.mattermost.com/u/mmospanenko)\
**Post date:** [September 9, 2022, 9:47am UTC](https://forum.mattermost.com/t/switching-on-amazon-s3-on-an-established-server/12330/6 "2022-09-09T09:47:03Z")

</div>

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
