# 恢复备份已损坏

**URL:** https://meta.discourse.org/t/restore-backup-is-broken/179514
**Category:** Bug
**Created:** [2021年二月12日 22:00 UTC](https://meta.discourse.org/t/restore-backup-is-broken/179514 "2021-02-12T22:00:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![codechef](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codechef/32/90261_2.png) [@codechef](https://meta.discourse.org/u/codechef)
#### Post date: [2021年二月12日 22:00 UTC](https://meta.discourse.org/t/restore-backup-is-broken/179514/1 "2021-02-12T22:00:06Z")

</div>

我认为 [这个提交](https://github.com/discourse/discourse/commit/4d719725c88a0a3e8e50c5a1ea9e634c1a39b1e3#diff-76dbd61de4b5917f65d47fb9356b51cb398163104359464999e410586afd309b) 导致通过 UI 恢复功能失效。我收到了以下错误：

```
Traceback (most recent call last):
	5: from /src/script/spawn_backup_restore.rb:4:in `<main>'
	4: from /src/script/spawn_backup_restore.rb:4:in `fork'
	3: from /src/script/spawn_backup_restore.rb:36:in `block in <main>'
	2: from /src/script/spawn_backup_restore.rb:15:in `restore'
	1: from /src/script/spawn_backup_restore.rb:15:in `new'
/src/lib/backup_restore/restorer.rb:12:in `initialize': missing keyword: :location (ArgumentError)

```

看起来 spawn\_backup\_restore.rb 可能只需要在构造函数中添加 location:nil？

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [2021年二月12日 22:44 UTC](https://meta.discourse.org/t/restore-backup-is-broken/179514/3 "2021-02-12T22:44:23Z")

</div>

对此我深感抱歉。我将在周一修复。目前您可以通过使用 CLI 来规避此问题：[Restore a backup from the command line](https://meta.discourse.org/t/restore-a-backup-from-command-line/108034?u=gerhard)

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [2021年二月15日 15:47 UTC](https://meta.discourse.org/t/restore-backup-is-broken/179514/4 "2021-02-15T15:47:26Z")

</div>

已在 [FIX: Restoring backup via UI was broken (#12089) · discourse/discourse@4b05fc2 · GitHub](https://github.com/discourse/discourse/commit/4b05fc2d2dea2d1ceefbc470730d950439959fff) 中修复

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [2021年二月15日 15:47 UTC](https://meta.discourse.org/t/restore-backup-is-broken/179514/5 "2021-02-15T15:47:31Z")

</div>


