# 由于键 (plugin\_name, key)=(discourse-data-explorer, q:-1) 重复，还原失败

**URL:** <https://meta.discourse.org/t/restore-failed-due-to-key-plugin-name-key-discourse-data-explorer-q-1-is-duplicated/157535>\
**Category:** Self-hosting\
**Created:** [2020 年7 月 13 日 02:00 UTC](https://meta.discourse.org/t/restore-failed-due-to-key-plugin-name-key-discourse-data-explorer-q-1-is-duplicated/157535 "2020-07-13T02:00:22Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![xiasummer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xiasummer/32/82790_2.png) [@xiasummer](https://meta.discourse.org/u/xiasummer)\
发布日期： [2020 年7 月 13 日 02:00 UTC](https://meta.discourse.org/t/restore-failed-due-to-key-plugin-name-key-discourse-data-explorer-q-1-is-duplicated/157535/1 "2020-07-13T02:00:22Z")

</div>

升级 Discourse 后，我发现它无法正常工作。我可以看到分类页面，但无法阅读首页或最新页面，例如最新页面：

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/0/f03f8bfadb76f9f6ed3c02c4f06648b05d2c889a.png)

我已经删除了所有插件，包括官方和非官方插件。但问题仍然存在。

因此，我尝试恢复备份，但发现了以下消息。

```plaintext
[2020-07-12 01:16:20] ERROR: could not create unique index "index_plugin_store_rows_on_plugin_name_and_key"
[2020-07-12 01:16:20] DETAIL: Key (plugin_name, key)=(discourse-data-explorer, q:-1) is duplicated.
[2020-07-12 01:16:20] EXCEPTION: psql failed: DETAIL: Key (plugin_name, key)=(discourse-data-explorer, q:-1) is duplicated.

[2020-07-12 01:16:20] /var/www/discourse/lib/backup_restore/database_restorer.rb:95:in `restore_dump'
/var/www/discourse/lib/backup_restore/database_restorer.rb:26:in `restore'
/var/www/discourse/lib/backup_restore/restorer.rb:49:in `run'
/var/www/discourse/lib/backup_restore.rb:188:in `block in start!'

```

---

_[View the full topic](https://meta.discourse.org/t/restore-failed-due-to-key-plugin-name-key-discourse-data-explorer-q-1-is-duplicated/157535)._
