# 2.7.0.beta2 upgrade failed with ERROR: duplicate key

**URL:** https://meta.discourse.org/t/2-7-0-beta2-upgrade-failed-with-error-duplicate-key/176980
**Category:** Self-hosting
**Created:** [January 22, 2021, 8:25pm UTC](https://meta.discourse.org/t/2-7-0-beta2-upgrade-failed-with-error-duplicate-key/176980 "2021-01-22T20:25:45Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [January 22, 2021, 8:37pm UTC](https://meta.discourse.org/t/2-7-0-beta2-upgrade-failed-with-error-duplicate-key/176980/2 "2021-01-22T20:37:31Z")

</div>

I think you can get the site back up with `./launcher start app`

Then take a look at ways to delete the duplicate:

> [@Duplicate data explorer key blocking rebuild](https://meta.discourse.org/t/duplicate-data-explorer-key-blocking-rebuild/162375):
>
> Hey all, Rare I ask for help, but I’m puzzled about how to resolve this. Just rebuilt my site and getting this: discourse-data-explorer is already at latest compatible version I, [2020-08-28T17:53:57.578920 #1] INFO -- : \> cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' 2020-08-28 17:54:07.380 UTC [3060] discourse@discourse ERROR: duplicate key value violates unique constraint "data\_explorer\_queries\_pkey" 2020-08-28 17:54:07.380 UTC [3060] discourse@discourse DETAIL:…

and

> [@Failed upgrade: UniqueViolation: duplicate key value violates unique constraint "data\_explorer\_queries\_pkey"](https://meta.discourse.org/t/failed-upgrade-uniqueviolation-duplicate-key-value-violates-unique-constraint-data-explorer-queries-pkey/163667):
>
> Today’s upgrade to latest failed: FAILED -------------------- Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #\<Process::Status: pid 3194 exit 1\> Location of failure: /pups/lib/pups/exec\_command.rb:112:in `spawn' exec failed with the params {"cd"=\>"$home", "hook"=\>"db\_migrate", "cmd"=\>["su discourse -c 'bundle exec rake db:migrate'"]} 590cf0611c566ea6df5f70ffdd2cec2359e84eaea29b7abcde77d56288a46370 \*\* FAILED TO BOOTSTRAP \*\* please scrol…

---

_[View the full topic](https://meta.discourse.org/t/2-7-0-beta2-upgrade-failed-with-error-duplicate-key/176980)._
