# 如何备份和还原整个 /var/discourse 应用文件夹？

**URL:** <https://meta.discourse.org/t/how-to-backup-and-restore-a-whole-var-discourse-app-folder/152598>\
**Category:** Self-hosting\
**Created:** [2020年五月25日 10:35 UTC](https://meta.discourse.org/t/how-to-backup-and-restore-a-whole-var-discourse-app-folder/152598 "2020-05-25T10:35:13Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![D8vid](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@D8vid](https://meta.discourse.org/u/D8vid)\
**Post date:** [2020年六月19日 12:34 UTC](https://meta.discourse.org/t/how-to-backup-and-restore-a-whole-var-discourse-app-folder/152598/18 "2020-06-19T12:34:20Z")

</div>

我使用的一种方法，不涉及 `docker save` 或对 /var/discourse 进行完整的 tar+untar 操作：

> [@Self-hosting migration example — VPS to VPS](https://meta.discourse.org/t/self-hosting-migration-example-vps-to-vps/146034):
>
> I’m sharing my recent experience of migrating a self-hosted Discourse installation from one VPS to another, as a way of saying ‘thanks!’ to the creators of Discourse and its community of administrators. This migration preserves LetsEncrypt SSL & email configurations. The original installation was on a Google Cloud Platform (GCP) g1-small instance type (1 vCPU, 1.7 GB RAM), using the official guide ([INSTALL-cloud.md](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)) & tracking the tests-passed branch. The new installation is on an [Evolution Ho…](https://evolution-host.com/)

---

_[View the full topic](https://meta.discourse.org/t/how-to-backup-and-restore-a-whole-var-discourse-app-folder/152598)._
