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

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(
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(
	at org.postgresql.core.v3.QueryExecutorImpl.execute(
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(
	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(
	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(
	at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(
	at net.sf.hibernate.persister.EntityPersister.insert(
	... 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

This widget could not be displayed.

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:

And so follow these steps to upgrade:

Hope this helps.

Best Regards,


Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Tuesday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

140 views 12 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you