Getting this error during restore: `could not create unique index`


I am trying to get my staging instance up to date with my production instance. I successfully upgraded to the current version, but am receiving the following error while trying to restore my prod backup to my staging instance:

[2020-01-14 23:27:08] ERROR:  could not create unique index "index_tags_on_lower_name"
[2020-01-14 23:27:08] DETAIL:  Key (lower(name::text))=(net) is duplicated.
[2020-01-14 23:27:08] EXCEPTION: psql failed: DETAIL:  Key (lower(name::text))=(net) is duplicated.

I found this topic which seems similar, but don’t know how to implement the solution.

Any guidance would be appreciated!


1 Like

I had a similar issue. I describe how I fixed it in Can't restore due to corrupt indexes (with some clues on how to deal with corrupt indexes), but it’s largely hand-waiving.