Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot upgrade. Import backup from Confluence 3.5 into Confluence 4.0 fails due to constraint "cp_unique_user"

Klaus Stake
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 6, 2011

I think this is a bug. I've already opened an issue. I've installed Confluence 4.0 and tried to import a backup from Confluene 3.5 during installation. I use a Postgres database. The installation fails with an exception in the log files.

Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "cp_unique_user"
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
	at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
	at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462)
	... 51 more

Did anybody experience the same?
When I get a response or solution from the Atlassian support I will post it here.

1 answer

0 votes
LuizA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2013

Hello Klaus,

You're receiving this error because this kind of import does not work. If you want to import a backup from your 3.5 version you'll have to do this using a 3.5 version, in other words it's only possible to import a backup into the same version, for example:

* Backup from a 3.5 version > only can be imported into another 3.5 version

If you want to upgrade your Confluence, then you need to follow some steps to achieve this goal, the first one that we recommend it is to create a test environment to test the upgrade in a first moment and avoid problems in the production environment (best practice) based on this procedure:

https://confluence.atlassian.com/display/CONF35/Migrating+Confluence+Between+Servers

And so follow these steps to upgrade:

https://confluence.atlassian.com/display/DOC/Upgrading+Confluence

Hope this helps.

Best Regards,

LJ.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events