Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Confluence site XML import failed due to duplicate entry '' for key unq_lwr_username

After a disaster (physical server lost in flames), we attempted to restore our Confluence Server instance from an XML backup.
The import fails with a known error com.atlassian.confluence.importexport.ImportExportException: Unable to complete import because the data does not match the constraints in the Confluence schema. Cause: MySQLIntegrityConstraintViolationException: Duplicate entry '' for key 'unq_lwr_username'

There are available workaround when the entry is not null or when the original database is available (Ha Ha!).

We are running Confluence 6.13.8

The entities.xml file alone is 1.8GB and the import takes days. So that playing with the database while import is running is feasible.

Any help welcome !

1 answer

0 votes
Fabian Lim Community Leader Dec 24, 2021


I found this KB article that will help other admins if they encounter the same issue:


MySQLIntegrityConstraintViolationException: Column 'USERNAME' cannot be null

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Watch 4 Confluence apps compete for Best App Demo in September's Appy Hours

Calling all collaborators! Appy Hours on the Atlassian Community is a monthly event where 4 Partner and app vendor presenters go head-to-head with 5-minute demos for the title of Best App Demo. I...

486 views 0 12
Read article

Atlassian Community Events