# 从 AWS 迁移到 Digital Ocean，包含 2 个容器、Spaces 和 2 个 CDN

**URL:** https://meta.discourse.org/t/migrate-from-aws-to-digital-ocean-with-2-containers-spaces-and-2-cdns/155445
**Category:** Support
**Created:** [2020年六月20日 18:37 UTC](https://meta.discourse.org/t/migrate-from-aws-to-digital-ocean-with-2-containers-spaces-and-2-cdns/155445 "2020-06-20T18:37:02Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![dfriestedt](https://avatars.discourse-cdn.com/v4/letter/d/a698b9/32.png) [@dfriestedt](https://meta.discourse.org/u/dfriestedt)
#### Post date: [2020年九月21日 12:20 UTC](https://meta.discourse.org/t/migrate-from-aws-to-digital-ocean-with-2-containers-spaces-and-2-cdns/155445/3 "2020-09-21T12:20:19Z")

</div>

这个周末我终于成功从 AWS 迁移到了 DigitalOcean。以下是我的最终步骤：

1. AWS 地址为 `live.example.com`
2. 在 `live2.example.com` 上设置并运行 DigitalOcean 的 Discourse 实例
3. AWS 和 DigitalOcean 实例均运行相同版本的 Discourse
4. 将 `live.example.com` 设为只读模式，并通过图形界面进行备份
5. 使用 SCP 将备份文件从 AWS 服务器传输到 DigitalOcean 服务器
6. 在 DigitalOcean 服务器上，将 `app.yml` 中的域名更改为 `live.example.com`，然后执行 `./launcher rebuild app`
7. 接着在 DigitalOcean 服务器命令行中恢复备份：[Restore a backup from the command line](https://meta.discourse.org/t/restore-a-backup-from-command-line/108034)
8. 随后更新 DNS 记录，将 `live.example.com` 指向 DigitalOcean 服务器。
9. 至此，您的服务器已正常运行。
10. 然后我按照以下说明配置 S3 上传功能：[Configure an S3 compatible object storage provider for uploads](https://meta.discourse.org/t/using-object-storage-for-uploads-s3-clones/148916)
11. 最后，我按照以下说明配置全站 CDN 加速：[Full site CDN acceleration for Discourse](https://meta.discourse.org/t/full-site-cdn-acceleration-for-discourse/21467)

---

_[View the full topic](https://meta.discourse.org/t/migrate-from-aws-to-digital-ocean-with-2-containers-spaces-and-2-cdns/155445)._
