# Error when restoring from backup to new installation

**URL:** <https://meta.discourse.org/t/error-when-restoring-from-backup-to-new-installation/173702>\
**Category:** Self-hosting\
**Created:** [December 18, 2020, 12:42pm UTC](https://meta.discourse.org/t/error-when-restoring-from-backup-to-new-installation/173702 "2020-12-18T12:42:13Z")\
**Posts on this page:** 2\
**Page:** 1

## AI-generated summary

[h.vdheurik](/t/-/173702/1) reports an issue when attempting to restore a Discourse backup from a working installation to a new test instance. The restoration process fails with a PostgreSQL error indicating that the relation "github_user_infos" already exists. [2 paresy](/t/-/173702/2) asks if this problem was resolved, noting that they are experiencing a similar failure. Their error log shows the relation "allowed_pm_users" already exists, resulting in a psql failure. Both users are encountering "relation already exists" errors during the restore process on new installations.

<div class="post-metadata">

**Author:** ![h.vdheurik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/h.vdheurik/32/78661_2.png) [@h.vdheurik](https://meta.discourse.org/u/h.vdheurik)\
**Post date:** [December 18, 2020, 12:42pm UTC](https://meta.discourse.org/t/error-when-restoring-from-backup-to-new-installation/173702/1 "2020-12-18T12:42:13Z")

</div>

I’m trying to restore a backup from a working discourse installation to a new (test) discourse installation. It keeps failing with the following errors :

```
[2020-12-18 12:37:14] ERROR: relation "github_user_infos" already exists
[2020-12-18 12:37:14] EXCEPTION: psql failed: ERROR: relation "github_user_infos" already exists

```

---

<div class="post-metadata">

**Author:** ![paresy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paresy/32/96471_2.png) [@paresy](https://meta.discourse.org/u/paresy)\
**Post date:** [February 18, 2021, 3:12pm UTC](https://meta.discourse.org/t/error-when-restoring-from-backup-to-new-installation/173702/2 "2021-02-18T15:12:58Z")

</div>

@h.vdheurik Where you able to fix this problem? Mine is quitting with the following:

```plaintext
ERROR: relation "allowed_pm_users" already exists
EXCEPTION: psql failed: ERROR: relation "allowed_pm_users" already exists

```
