# Restore problem: "Could no create unique index"

**URL:** https://meta.discourse.org/t/restore-problem-could-no-create-unique-index/172754
**Category:** Support
**Created:** [December 9, 2020, 3:07pm UTC](https://meta.discourse.org/t/restore-problem-could-no-create-unique-index/172754 "2020-12-09T15:07:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Juste](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@Juste](https://meta.discourse.org/u/Juste)
#### Post date: [December 9, 2020, 3:07pm UTC](https://meta.discourse.org/t/restore-problem-could-no-create-unique-index/172754/1 "2020-12-09T15:07:42Z")

</div>

Hi. I am trying to restore the forum using the downloaded backup, but getting the following error:

`ERROR: could not create unique index "index_users_on_username_lower"DETAIL: Key (username_lower)=(alex) is duplicated.`

After looking into the usernames manually, I can see that there are two users with a name Alex - one with uppercase while another one with lowercase. Looks like it is perceived as a duplicate record. Any suggestion on how to resolve the issue would be highly appreciated.

---

<div class="post-metadata">

### Author: ![Vaping\_Community](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vaping_community/32/89248_2.png) [@Vaping\_Community](https://meta.discourse.org/u/Vaping_Community)
#### Post date: [December 9, 2020, 3:16pm UTC](https://meta.discourse.org/t/restore-problem-could-no-create-unique-index/172754/2 "2020-12-09T15:16:38Z")

</div>

You could try renaming one to Alex2 then try and change it back after restoring, otherwise a developer would have to chime in as to why this is happening

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [December 9, 2020, 8:07pm UTC](https://meta.discourse.org/t/restore-problem-could-no-create-unique-index/172754/3 "2020-12-09T20:07:35Z")

</div>

Can you fix it on the place it came from and get a new backup? That’s easiest. Next would be to edit the SQL with a different username.
