Hello, I am trying migrating Bamboo server to a new VM.
I have original server running: Bamboo 6.0.0 build 60001 - 24 Apr 17
New server running: 6.6.0 build 60604 - 25 Jun 18
During import of Bamboo backup created on server 6.0.0 build 60001 onto 6.6.0 build 60604 I get:
Import failed. Please contact Atlassian at https://support.atlassian.com/ and attach your export file. <br /> java.lang.RuntimeException: Unexpected exception
<a lot of logs ommited>
Caused by: java.sql.BatchUpdateException: Violation of UNIQUE KEY constraint 'ASSIGNMENT_UNIQUE'. Cannot insert duplicate key in object 'dbo.AGENT_ASSIGNMENT'. The duplicate key value is (62619649, AGENT, 55934980, PROJECT).
Prior to this I tried doing the following: alter table dbo.AGENT_ASSIGNMENT drop constraint ASSIGNMENT_UNIQUE;
|
In version 6.0.0 we didn't have the following constraint:
CONSTRAINT ASSIGNMENT_UNIQUE UNIQUE (EXECUTOR_ID,
EXECUTOR_TYPE,
EXECUTABLE_ID,
EXECUTABLE_TYPE)
It means that in the past we could have multiple rows with the same information and now this is prevented by the constraint as you already noticed.
Possible reasons for this problem
How to move forward
Thank you for suggestions @Daniel Santos
For the Case 2 I do not see any records in the table:
/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP (1000) [ASSIGNMENT_ID]
,[EXECUTOR_ID]
,[EXECUTOR_TYPE]
,[EXECUTABLE_ID]
,[EXECUTABLE_TYPE]
FROM [bamboodb].[dbo].[AGENT_ASSIGNMENT]
For the Case 1, could you please elaborate? I do not understand "clean copy of your old DB". I have a clean installation of 6.6.0 build 60604 with no plans or anything. Then I import backup from old server through Bamboo Administration page. I do not restore old server's DB onto new DB server. My understanding is that that "clean" DB will be populated with data from backup archive file during import.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For the Case 2 I do not see any records in the table:
Is it possible that you don't have them now but had them at the moment of your Backup?
It is really strange that Bambo is facing issues with duplicates if there is no data in this table... it could be a strange bug.
I have a clean installation of 6.6.0 build 60604 with no plans or anything. Then I import backup from old server through Bamboo Administration page. I do not restore old server's DB onto new DB server. My understanding is that that "clean" DB will be populated with data from backup archive file during import.
I got it, I thought you were using a different upgrade method, replicating the DB and using the copy to upgrade. In this process, you could have added upgrades, but I see this is not the case.
Can you try a new backup to check if this one will still have the same issue?
If it does, I'm afraid we will need to create a support ticket to analyze your data more closely and even replicate the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.