# 如何控制S3到本地这种上传转移的混乱

**URL:** https://meta.discourse.org/t/how-to-control-this-mess-of-shifting-uploads-from-s3-to-local/372778
**Category:** Support
**Tags:** s3
**Created:** [2025 年7 月 3 日 13:09 UTC](https://meta.discourse.org/t/how-to-control-this-mess-of-shifting-uploads-from-s3-to-local/372778 "2025-07-03T13:09:20Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2025 年7 月 3 日 13:56 UTC](https://meta.discourse.org/t/how-to-control-this-mess-of-shifting-uploads-from-s3-to-local/372778/3 "2025-07-03T13:56:59Z")

</div>

最简单的方法是（并且仍然可以是）启用 [Enable hidden setting to include S3 uploads in the backups](https://meta.discourse.org/t/enable-hidden-setting-to-include-s3-uploads-in-the-backups/276535) 设置，进行备份，然后在未配置 s3 的服务器上进行恢复（我会在新服务器上进行，以避免在出现问题时损坏旧服务器）。但听起来生产站点也已损坏，所以这可能毫无帮助。

如果你弄乱了 Uploads 表，使其包含多个 S3 路径，那么这项工作将更加困难。

我建议使用 [https://ask.discourse.com/，而不是](https://ask.discourse.com/%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF) ChatGPT，它至少了解 Discourse，但可能仍然帮不上大忙。

我会查看 `Uploads.pluck(:url)` 并查看其中有什么内容。

---

_[View the full topic](https://meta.discourse.org/t/how-to-control-this-mess-of-shifting-uploads-from-s3-to-local/372778)._
