# 将 S3 图像移动到本地主机

**URL:** https://meta.discourse.org/t/move-s3-image-to-local-host/155991
**Category:** Support
**Created:** [2020年六月26日 05:46 UTC](https://meta.discourse.org/t/move-s3-image-to-local-host/155991 "2020-06-26T05:46:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bck055](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@bck055](https://meta.discourse.org/u/bck055)
#### Post date: [2020年六月26日 05:46 UTC](https://meta.discourse.org/t/move-s3-image-to-local-host/155991/1 "2020-06-26T05:46:07Z")

</div>

各位好，

请问如何支持我将 S3 存储迁移到本地主机？

谢谢。

---

<div class="post-metadata">

### Author: ![markersocial](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/markersocial/32/170136_2.png) [@markersocial](https://meta.discourse.org/u/markersocial)
#### Post date: [2020年六月26日 05:48 UTC](https://meta.discourse.org/t/move-s3-image-to-local-host/155991/2 "2020-06-26T05:48:52Z")

</div>

我认为解决方案是：

```plaintext
cd /var/discourse
./launcher enter app
rake uploads:migrate_from_s3

```

然后禁用站点设置：  
disable: enable s3 uploads

接着运行：

```plaintext
rake posts:rebake

```

不过我尚未测试，因此建议您等待其他人确认后再操作。

---

<div class="post-metadata">

### Author: ![bck055](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@bck055](https://meta.discourse.org/u/bck055)
#### Post date: [2020年六月27日 06:41 UTC](https://meta.discourse.org/t/move-s3-image-to-local-host/155991/3 "2020-06-27T06:41:50Z")

</div>

@markersocial，发现了一个错误。  
还有其他建议吗？
