# Migrating S3 images to local; or from one S3 bucket to another

**URL:** https://meta.discourse.org/t/migrating-s3-images-to-local-or-from-one-s3-bucket-to-another/65313
**Category:** Support
**Created:** [2017 年 6 月 29 日午前 3:15 UTC](https://meta.discourse.org/t/migrating-s3-images-to-local-or-from-one-s3-bucket-to-another/65313 "2017-06-29T03:15:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![modius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/modius/32/108600_2.png) [@modius](https://meta.discourse.org/u/modius)
#### Post date: [2017 年 6 月 29 日午前 3:15 UTC](https://meta.discourse.org/t/migrating-s3-images-to-local-or-from-one-s3-bucket-to-another/65313/1 "2017-06-29T03:15:55Z")

</div>

We have an old Discourse instance (running latest version but initially installed a while back). It’s running under HTTP with all its images stored on an AWS S3 bucket with `.` (dots) in the name.

We want to move to HTTPS – configuring for Lets Encrypt works a treat but all the images are broken as S3 buckets with (dots) don’t appear to do SSL.

I’m thinking the simplest option would be to migrate all the images to the local instance – as its not an image heavy forum. But I can’t seem to work out how that would be done.

The alternative would be to migrate all the images to a new S3 bucket with an appropriate name. But I can’t seem to work out how that would be done either.

Can someone point me in the right direction?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2017 年 6 月 29 日午前 8:32 UTC](https://meta.discourse.org/t/migrating-s3-images-to-local-or-from-one-s3-bucket-to-another/65313/2 "2017-06-29T08:32:38Z")

</div>

> [@modius](#):
>
> I’m thinking the simplest option would be to migrate all the images to the local instance – as its not an image heavy forum. But I can’t seem to work out how that would be done.

Have you tried the `uploads:migrate_from_s3` rake task?

---

<div class="post-metadata">

### Author: ![modius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/modius/32/108600_2.png) [@modius](https://meta.discourse.org/u/modius)
#### Post date: [2017 年 6 月 29 日午前 9:52 UTC](https://meta.discourse.org/t/migrating-s3-images-to-local-or-from-one-s3-bucket-to-another/65313/3 "2017-06-29T09:52:48Z")

</div>

No, but I sure will 🙂  
Where can I find a list of available “rake tasks”?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2017 年 6 月 29 日午前 9:59 UTC](https://meta.discourse.org/t/migrating-s3-images-to-local-or-from-one-s3-bucket-to-another/65313/4 "2017-06-29T09:59:30Z")

</div>

Run “`rake -T`” in the discourse directory.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [2017 年 6 月 29 日午後 5:05 UTC](https://meta.discourse.org/t/migrating-s3-images-to-local-or-from-one-s3-bucket-to-another/65313/5 "2017-06-29T17:05:58Z")

</div>


