# 如何将 Discourse 从一台服务器迁移到另一台服务器，使用相同的 DNS 名称

**URL:** <https://meta.discourse.org/t/how-to-migrate-discourse-from-one-server-to-another-with-the-same-dns-name/175572>\
**Category:** Self-hosting\
**Created:** [2021 年1 月 9 日 05:03 UTC](https://meta.discourse.org/t/how-to-migrate-discourse-from-one-server-to-another-with-the-same-dns-name/175572 "2021-01-09T05:03:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
发布日期： [2021 年1 月 9 日 14:19 UTC](https://meta.discourse.org/t/how-to-migrate-discourse-from-one-server-to-another-with-the-same-dns-name/175572/2 "2021-01-09T14:19:13Z")

</div>

如果您不使用相同的 S3 存储桶，则有一个隐藏设置可强制备份下载 S3 文件。您可以在设置文件中查找该设置名称，并通过 Rails 控制台进行配置。有一个相关主题讨论了此问题，但最直接的方法是查看 settings.yml 文件。

您无需运行 discourse-setup，只需复制 app.yml 并重新构建即可。

您可以使用 rsync 同步 Let’s Encrypt 证书。实际上，您可以直接复制整个 /var/discourse 目录（可能需排除部分日志等文件）。

---

_[View the full topic](https://meta.discourse.org/t/how-to-migrate-discourse-from-one-server-to-another-with-the-same-dns-name/175572)._
