# 从命令行恢复备份

**URL:** https://meta.discourse.org/t/restore-a-backup-from-the-command-line/108034
**Category:** Self-Hosting
**Tags:** how-to
**Created:** [2019年一月31日 16:36 UTC](https://meta.discourse.org/t/restore-a-backup-from-the-command-line/108034 "2019-01-31T16:36:07Z")
**Posts on this page:** 1
**Showing post:** 66

<div class="post-metadata">

### Author: ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)
#### Post date: [2024年十一月7日 16:53 UTC](https://meta.discourse.org/t/restore-a-backup-from-the-command-line/108034/66 "2024-11-07T16:53:20Z")

</div>

我已经验证了我的管理员帐户在自托管上，并上传了 `.sql.gz` 备份，而不是 `.tar.gz`。

在 UI 中恢复没有成功，所以我从命令行执行了“恢复备份”，在 `discourse restore` 过程结束时显示 `[FAILED]`，官方托管的输入文件是 `.tar.gz` 是否会导致进程通过？

我的官方托管是几天前建立的，我的自托管在 [更改 `container.yml` 中的 SMTP 值](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326) 后于今天开始正常工作。

---

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