# 迁移S3到本地的预期路径

**URL:** <https://meta.discourse.org/t/intended-path-to-migrate-s3-to-local/264442>\
**Category:** Self-hosting\
**Tags:** uploads, s3\
**Created:** [2023年五月9日 18:13 UTC](https://meta.discourse.org/t/intended-path-to-migrate-s3-to-local/264442 "2023-05-09T18:13:33Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Adubs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adubs/32/220003_2.png) [@Adubs](https://meta.discourse.org/u/Adubs)\
**Post date:** [2023年五月11日 23:23 UTC](https://meta.discourse.org/t/intended-path-to-migrate-s3-to-local/264442/4 "2023-05-11T23:23:02Z")

</div>

错误似乎与将上传文件从备份移至 S3 相关。这些文件无论如何都已存在，这是否是问题的一部分？或者也许只是我的 S3 提供商继续出现问题，这就是我试图摆脱它们的原因。

无论如何，挖掘了一下找到了这个：

> [@Restore from backup fails due to S3 migration](https://meta.discourse.org/t/restore-from-backup-fails-due-to-s3-migration/127409/8?u=adubs):
>
> I solved; I open dump.sql with EmEditor program and search enable\_s3\_uploads, S3 and all “t” to “f” all “true” to “false”. Restore successful slight_smile

看起来这可能仍然适用。

从备份中提取数据库转储并重新压缩，然后再让软件重新解压缩 :firstworldproblem:，这非常耗时。也许可以使用容器中的 discourse 命令或通过 app.yml 来指定这一点。也许可以有一个“数据库设置覆盖”部分，供恢复过程首先查看？我主要是随口说说，因为我只是假装知道自己在做什么。

修改了必需的 `dump.sql` 后，恢复成功完成，但头像似乎已损坏，并且一些缩略图似乎不起作用，但当你点击图像时，它会正常加载。

我认为重新烘焙（rebake）可能会解决后一个问题。如果我只丢失头像，我不会非常生气。

---

_[View the full topic](https://meta.discourse.org/t/intended-path-to-migrate-s3-to-local/264442)._
