# 如何手动将S3文件迁移到本地？

**URL:** <https://meta.discourse.org/t/how-to-manually-migrate-s3-files-to-local/354469>\
**Category:** Support\
**Created:** [2025年二月25日 18:40 UTC](https://meta.discourse.org/t/how-to-manually-migrate-s3-files-to-local/354469 "2025-02-25T18:40:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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年二月25日 22:04 UTC](https://meta.discourse.org/t/how-to-manually-migrate-s3-files-to-local/354469/2 "2025-02-25T22:04:36Z")

</div>

> [@Yt.w](#):
>
> 我搜索了与我的问题相关的帖子，看起来不能再使用 `rake uploads:migrate_from_s3` 了。

首先，[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)

然后进行备份。之后恢复它。我建议在全新的服务器上恢复。你可以使用现有的 yml 文件，但要删除 USE\_S3、上传桶以及将资产上传到 S3 的相关内容。

你可以 [将 Discourse 站点迁移到另一个 VPS（使用 rsync）](https://meta.discourse.org/t/move-a-discourse-site-to-another-vps-with-rsync/43812)，这样你就会拥有 SSL 证书。我建议 `--exclude postgres_*`。

然后你可以 [从命令行恢复备份](https://meta.discourse.org/t/restore-a-backup-from-the-command-line/108034)。

---

_[View the full topic](https://meta.discourse.org/t/how-to-manually-migrate-s3-files-to-local/354469)._
