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

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
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

264 views 2 10
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