Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Restoring xml Backup fails: Key (lower_username)=() already exists

Jens Tanneberger October 3, 2019

I had to reinstall my physical Server (now Windows 2019 Server). Before that, I had made full XML and attachment backups from both JIRA and Confluence which had been running on the server (both Confluence and Jira remained at the same versions: Confluence 7.0.1 and Jira 8.4.1). I use a current PostgreSQL database on the same machine.

The Restoration of JIRA data to the newly installed machine worked well.

But after Installing Confluence and trying to restore the xmlexport-20191002-205412-19.zip file (about 1 GB total size including about 250 MB entities.xml) from the .\restore folder this fails after one minute with following error message. Unfortunately, the problematic username ist "()" so the problem is hard to identify.

2019-10-03 Confluence Restore fails.jpgIn case it may be related: In the old installation, JIRA was also used as the user database for Confluence.

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 11, 2019

Hi Jens,

Sorry to hear about this import problem with Confluence.  We have seen this particular kind of error before.  Atlassian support created a knowledge base article in order to help users like yourself get past this problem.  Please see Confluence site XML import fails with "duplicate key" error for more details.

There are a couple of different ways to address this problem.  If you still have access to the old server and old database, there are steps there where you can adjust these records in the database directly, then flush the cache in confluence, before creating a new XML backup (Resolution #2).

OR

If you only have access to the XML backup file, there are also steps you can follow in the Workaround section in order to find the duplicate username entry in the entities.xml file (found in the backup XML .zip file) and delete the duplicate object from that file.  Once you do that, you can then save that file, add it back to the zip and use that new zip file for the import instead.

Please let us know if you have any questions or concerns when trying to follow these steps.

Cheers,

Andy

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events