# 从命令行备份Discourse

**URL:** <https://meta.discourse.org/t/backup-discourse-from-the-command-line/64364>\
**Category:** Self-Hosting\
**Tags:** backups, how-to\
**Created:** [2017年六月12日 15:59 UTC](https://meta.discourse.org/t/backup-discourse-from-the-command-line/64364 "2017-06-12T15:59:45Z")\
**Posts on this page:** 1\
**Showing post:** 38

<div class="post-metadata">

**Author:** ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)\
**Post date:** [2026年五月17日 21:32 UTC](https://meta.discourse.org/t/backup-discourse-from-the-command-line/64364/38 "2026-05-17T21:32:27Z")

</div>

备份脚本显示：

```plaintext
完成！
[成功]
备份已完成。
输出文件位于：/var/www/discourse/public/backups/default/FILENAME.tar.gz

```

起初我尝试下载该路径下的文件，但发现路径有误。后来我在其他位置找到了该文件，这才注意到本主题中的命令是正确的…

---

_[View the full topic](https://meta.discourse.org/t/backup-discourse-from-the-command-line/64364)._
