# Migrating Continua to new Server

**URL:** https://www.finalbuilder.com/forums/t/migrating-continua-to-new-server/5704
**Category:** Discussion
**Created:** [October 5, 2016, 5:58am UTC](https://www.finalbuilder.com/forums/t/migrating-continua-to-new-server/5704 "2016-10-05T05:58:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![marcel.oertig](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@marcel.oertig](https://www.finalbuilder.com/forums/u/marcel.oertig)
#### Post date: [October 5, 2016, 5:58am UTC](https://www.finalbuilder.com/forums/t/migrating-continua-to-new-server/5704/1 "2016-10-05T05:58:03Z")

</div>

Hi,  
  
we want to migrating the Continua Server. When we restore the database there are a lot of errors. Is this normal?  
  
A part of the Output:  
(1 row)

COPY 0  
COPY 0  
ERROR:&nbsp; insert or update on table “builds\_stage” violates foreign key constraint "fk\_builds\_stage\_to\_builds\_build"  
DETAIL:&nbsp; Key (buildid)=(20011) is not present in table “builds\_build”.  
ERROR:&nbsp; insert or update on table “builds\_stagedefinition” violates foreign key constraint "fk\_builds\_stagedefinition\_to\_core\_project"  
DETAIL:&nbsp; Key (projectid)=(d76e7b8c-f438-40fc-995d-a46d00b1138f) is not present in table “core\_project”.  
ERROR:&nbsp; insert or update on table “builds\_stagedefinitionpromotecondition” violates foreign key constraint "fk\_builds\_stagedefinitionpromotecondition\_to\_builds\_stagedefini"  
DETAIL:&nbsp; Key (stagedefinitionid)=(6ef45b67-7a31-4b4a-8b23-a619011188a9) is not present in table “builds\_stagedefinition”.  
ERROR:&nbsp; insert or update on table “builds\_stagedefinitionsharedresourcelock” violates foreign key constraint "fk\_builds\_stagedefinitionsharedresourcelock\_to\_builds\_stagedefi"  
DETAIL:&nbsp; Key (stagedefinitionid)=(865e271d-5a25-4a45-b957-a69000932428) is not present in table “builds\_stagedefinition”.  
ERROR:&nbsp; insert or update on table “builds\_stagedefinitionskipcondition” violates foreign key constraint "fk\_builds\_stagedefinitionskipcondition\_to\_builds\_stagedefinitio"  
DETAIL:&nbsp; Key (stagedefinitionid)=(a86d9858-b4a3-4122-8c40-a59100ddc4f5) is not present in table “builds\_stagedefinition”.  
ERROR:&nbsp; insert or update on table “builds\_stagedefinitionversiongatecondition” violates foreign key constraint "fk\_builds\_stagedefinitionversiongatecondition\_to\_builds\_stagede"  
DETAIL:&nbsp; Key (stagedefinitionid)=(841f8786-3522-4ea3-b9e8-a46d00e2d256) is not present in table “builds\_stagedefinition”.  
ERROR:&nbsp; insert or update on table “builds\_stagedefinitionversionrequirement” violates foreign key constraint "fk\_builds\_stagedefinitionversionrequirement\_to\_builds\_stagedefi"  
DETAIL:&nbsp; Key (stagedefinitionid)=(1f68050b-3dc6-4937-9f0a-a4f300de7a38) is not present in table “builds\_stagedefinition”.  
ERROR:&nbsp; insert or update on table “builds\_stagemetric” violates foreign key constraint "fk\_builds\_stagemetric\_to\_builds\_stage"  
DETAIL:&nbsp; Key (stageid)=(afe8579d-00fb-4683-ac25-a68d0139f8a9) is not present in table “builds\_stage”.  
ERROR:&nbsp; insert or update on table “builds\_trigger” violates foreign key constraint "fk\_builds\_trigger\_to\_builds\_configuration"  
DETAIL:&nbsp; Key (configurationid)=(7acfa591-fb53-4a8a-8e95-a47400b11450) is not present in table “builds\_configuration”.  
ERROR:&nbsp; insert or update on table “builds\_triggercondition” violates foreign key constraint "fk\_builds\_triggercondition\_to\_builds\_trigger"  
DETAIL:&nbsp; Key (triggerid)=(ff3a4cac-ef12-4687-9f9a-a5d900ec008e) is not present in table “builds\_trigger”.  
COPY 540  
&nbsp;setval  
--------  
&nbsp;&nbsp;&nbsp; 541  
(1 row)

ERROR:&nbsp; insert or update on table “builds\_triggervariable” violates foreign key constraint "fk\_builds\_triggervariable\_to\_builds\_trigger"  
DETAIL:&nbsp; Key (triggerid)=(77a57d98-c2c7-460d-9550-a47c0097cf1d) is not present in table “builds\_trigger”.  
…  
  
  
ERROR:&nbsp; multiple primary keys for table “core\_sharedresourceitem” are not allowed  
ERROR:&nbsp; multiple primary keys for table “core\_sharedresourceitemquota” are not allowed  
ERROR:&nbsp; multiple primary keys for table “core\_subscription” are not allowed  
ERROR:&nbsp; multiple primary keys for table “core\_user” are not allowed  
ERROR:&nbsp; multiple primary keys for table “core\_userproperty” are not allowed  
ERROR:&nbsp; multiple primary keys for table “core\_variable” are not allowed  
ERROR:&nbsp; multiple primary keys for table “core\_variablenamespace” are not allowed  
ERROR:&nbsp; multiple primary keys for table “versioninfo” are not allowed  
ERROR:&nbsp; relation “ix\_build\_configuration\_namesortcode” already exists  
ERROR:&nbsp; relation “ix\_builds\_agent\_hostname” already exists  
ERROR:&nbsp; relation “ix\_builds\_agent\_lastactive” already exists  
ERROR:&nbsp; relation “ix\_builds\_agentauthorization\_userid” already exists  
ERROR:&nbsp; relation “ix\_builds\_agentcachedrepository\_agentid” already exists  
ERROR:&nbsp; relation “ix\_builds\_agentcachedrepository\_repositoryid” already exists  
ERROR:&nbsp; relation “ix\_builds\_agentfault\_agentid” already exists  
ERROR:&nbsp; relation “ix\_builds\_agentproperty\_agentid” already exists  
ERROR:&nbsp; relation “ix\_builds\_agentproperty\_agentid\_namespace\_name” already exists  
ERROR:&nbsp; relation “ix\_builds\_agentproperty\_name” already exists  
ERROR:&nbsp; relation “ix\_builds\_agentproperty\_namespace” already exists  
ERROR:&nbsp; relation “ix\_builds\_artifact\_buildid” already exists  
ERROR:&nbsp; relation “ix\_builds\_build\_configurationid” already exists  
ERROR:&nbsp; relation “ix\_builds\_build\_configurationversionid” already exists  
ERROR:&nbsp; relation “ix\_builds\_build\_configurationversionid\_summarystate\_id\_finished” already exists  
ERROR:&nbsp; relation “ix\_builds\_build\_finished” already exists  
ERROR:&nbsp; relation “ix\_builds\_build\_started” already exists  
ERROR:&nbsp; relation “ix\_builds\_build\_summarystate” already exists  
ERROR:&nbsp; relation “ix\_builds\_build\_summarystate\_id\_finished\_configurationid” already exists  
ERROR:&nbsp; relation “ix\_builds\_build\_summarystate\_id\_finished\_configurationversionid” already exists

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [October 5, 2016, 11:47am UTC](https://www.finalbuilder.com/forums/t/migrating-continua-to-new-server/5704/2 "2016-10-05T11:47:37Z")

</div>

Hi Marcel,  
  
No. This is not normal. Which backup and restore options are you using? If you are restoring to an existing database ensure that you have included drop and create database statements in you backup.

---

<div class="post-metadata">

### Author: ![marcel.oertig](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@marcel.oertig](https://www.finalbuilder.com/forums/u/marcel.oertig)
#### Post date: [October 6, 2016, 8:00am UTC](https://www.finalbuilder.com/forums/t/migrating-continua-to-new-server/5704/3 "2016-10-06T08:00:09Z")

</div>

Hi Dave,   
  
 Thanks, this was the problem.
