How to troubleshoot the binary datatype error for backup restore process.
Problem Statement
Delegated Project Creator seems to be using binary data type which prevents backup and restore from working
Error MessageÂ
Error importing data: java.lang.IllegalArgumentException: Unsupported field encountered:binary
Log EntriesÂ
2020-12-04 09:21:23,436+1300 JiraImportTaskExecutionThread-1 ERROR dwighth 560x155x1 8ufalp 0:0:0:0:0:0:0:1 /secure/admin/XmlRestore.jspa [c.a.j.bc.dataimport.DefaultDataImportService] Error importing data: java.lang.IllegalArgumentException: Unsupported field encountered: binary
java.lang.IllegalArgumentException: Unsupported field encountered: binary
at com.atlassian.dbexporter.importer.DataImporter$BaseInserter.setValue(DataImporter.java:372)
Environment
Application | Confluence |
---|
Cause
When migrating a Jira Software server to another Jira Software server by performing backup and restore by repeating the process, the restore failed with the above error.
This could be due to a binary data type in the activeobjects.xml exported from the old server which seems to be a table created by the Delegated Project Creator for Jira app.
Solution
To fix this issue, you can delete the below 2 fields from the database in the source Jira instance before taking the XML backup file. Post changes, take an XML backup file, and restore in the target Jira instance.
TEMPLATE_AVATAR_STREAM
TEMP_TEMPLATE_AVATAR_STREAM
Steps:
Bring down the source Jira instance.
Take the source database backup before executing the SQL queries.
Go to the source database and execute the below SQL queries. The queries work in MySQL.
ALTER table AO_275653_PROJECT_TEMPLATE DROP column TEMPLATE_AVATAR_STREAM; ALTER table AO_275653_PROJECT_TEMPLATE DROP column TEMP_TEMPLATE_AVATAR_STREAM;
Bring up source Jira instance.
Take an XML backup.
Restore the XML backup in the target Jira instance.
It is recommended to try the above work around in a staging or a non-production environment first.