[User-login] Restoring old Jira backup to 8.22.0 and newer

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

JRASERVER-70690 - 課題詳細を取得中... ステータス

ユーザーログインの Jira Stats 記録

[User-login] Restoring Jira 8.22 (and newer) backup to Cloud

Restoring old Jira backup to 8.22.0 and newer

Old backups with corrupted Membership rows cannot be restored to Jira 8.22 and future releases, because of the new uniqueness constraint.

There is a number of workarounds to remove corrupted rows:

Workaround 1a - grep

Find violating rows by running the following script:

grep '<Membership' $BACKUP_FILE | sed -E 's|.*<Membership .*(membershipType=[^ ]+).*( lowerParentName=[^ ]+).*( lowerChildName=[^ ]+).*( directoryId=[^ ]+).*/>|\1\2\3\4|' | sort | uniq -d

e.g.

$ grep '<Membership' $BACKUP_FILE | sed -E 's|.*<Membership .*(membershipType=[^ ]+).*( lowerParentName=[^ ]+).*( lowerChildName=[^ ]+).*( directoryId=[^ ]+).*/>|\1\2\3\4|' | sort | uniq -dmembershipType="GROUP_USER" lowerParentName="jira-project-admins" lowerChildName="proadmin" directoryId="1"


and remove the duplicates from the backup (leave only one entry!).

Workaround 1b - xsltproc

Find violating rows by running the following script:


xsltproc membership_uniq.xslt $BACKUP_FILE | sort | uniq -d

with the following XLS transformation in membership_uniq.xslt file:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='text'/>
<xsl:template match="/">
  <xsl:for-each select="entity-engine-xml/Membership">lowerParentName="<xsl:value-of select="@lowerParentName"/>" lowerChildName=<xsl:value-of select="@lowerChildName"/>" membershipType="<xsl:value-of select="@membershipType"/>" directoryId="<xsl:value-of select="@directoryId"/>"
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

and remove the duplicates from the backup (leave one entry!).

回避策 2

Import the backup into Jira < 8.22 and upgrade afterwards to Jira >= 8.22.

回避策 3

Drop uk_mem_dir_parent_child index and it will be recreated by the upgrade task.

最終更新日: 2022 年 1 月 24 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.