Cannot Restore XML Backup due to Database Encoding

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

When importing an XML backup, the following messages appear in the logs:

ERROR [Importing data task] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry '295213' for key 1 - url: /setup/setup-restore.action \| userName: anonymous \| action: setup-restore
ERROR [Importing data task] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Incorrect string value: '\xEF\x81\xA9 No...' for column 'BODY' at row 1 - url: /setup/setup-restore.action | userName: anonymous | action: setup-restore

Cause

The database is not set to the correct encoding.

Resolution

Make sure your database is using the correct encoding. Follow the guide Configuring Database Character Encoding. Confirm that the database is set to UTF-8.

Updated on May 22, 2025

Still need help?

The Atlassian Community is here for you.