# Step-by-step for moving large site uploads to S3?

**URL:** <https://meta.discourse.org/t/step-by-step-for-moving-large-site-uploads-to-s3/94321>\
**Category:** Product Support\
**Created:** [August 9, 2018, 4:01pm UTC](https://meta.discourse.org/t/step-by-step-for-moving-large-site-uploads-to-s3/94321 "2018-08-09T16:01:41Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Gunnar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gunnar/32/119647_2.png) [@Gunnar](https://meta.discourse.org/u/Gunnar)\
**Post date:** [August 9, 2018, 10:34pm UTC](https://meta.discourse.org/t/step-by-step-for-moving-large-site-uploads-to-s3/94321/4 "2018-08-09T22:34:21Z")

</div>

> [@mmayo](#):
>
> We then need to [remap](https://github.com/discourse/discourse/blob/master/script/discourse#L5) all of the references to the public uploads folder to the new location in s3. At the console in your docker container:  
> `root@dc53d70f611c:/var/www/discourse# discourse remap /uploads/default/ //<your-s3-bucket>.s3.amazonaws.com/ Rewriting all occurences of /uploads/default/ to //<your-s3-bucket>.s3.amazonaws.com/ THIS TASK WILL REWRITE DATA, ARE YOU SURE (type YES) YES Remapping ar_internal_metadata key 0 rows affected! Remapping ar_internal_metadata value ... many more rows`

That did not work as expected. Images in posts now have URLs like this:

`https://forums.jag-lovers.com//jl-discourse-uploads.s3.amazonaws.com/original/3X/b/3/b38c9407f8d17b269dc7ee8845d85cf5189ce8b5.jpeg`

Instead of this:  
`https://jl-discourse-uploads.s3.amazonaws.com/original/3X/b/3/b38c9407f8d17b269dc7ee8845d85cf5189ce8b5.jpeg`

While on the other hand the small category icons (we use a custom icon for each category) have the correct URLs.

What did I miss?

Thanks,  
Gunnar

---

_[View the full topic](https://meta.discourse.org/t/step-by-step-for-moving-large-site-uploads-to-s3/94321)._
