サイトまたはスペースのバックアップの作成またはインポート時にエラーが発生する場合
XML バックアップの復元の試行時のエラーの解決
データベースのわずかな破損によってエラーが発生する場合があります。DB ルールに違反している XML バックアップ ファイルのエントリーを見つけて、そのエントリーを修正し、XML バックアップを再作成する必要があります。
- On the instance being restored, follow the instructions to disable batched updates (for simpler debugging), log SQL queries and log SQL queries with parameters at http://confluence.atlassian.com/display/DOC/Enabling+detailed+Hibernate+logging
- Once all three changes have been made, restart Confluence
- Attempt another restore
- Once the restore fails, check your log files to find out what object could not be converted into XML format. For Confluence Standalone users, check your Confluence install directory under the
/logs/ and check both atlassian-confluence.log and catalina.out file. The correct file will contain SQL debug output.
- ファイルの一番下までスクロールし、データベース制約の違反に関する最後のエラーを特定します。例:
この例では、attachment テーブルの ID = 38 の行でタイトルが null になっていることを示しています。
- 作成されたバックアップのあるサーバーに移動します。作成されたバックアップからコピーを取得する必要があります。これを行わないと、DBA ツールを使用してデータベースの手動バックアップを復元することができません。
- Open a DBA tool and connect to the original database instance and scan the table names in the schema. You will have to modify a row in one of these tables
- テーブルを特定するには、
catalina.out を開き、例外の最初の行を確認します。以下は、データベースでのオブジェクトとテーブル間のマッピングを確認するための概要です。
- ページ、ブログ投稿、コメント --> CONTENT テーブル
- 添付ファイル --> ATTACHMENTS テーブル
- 上記の例のエラーを修正するには、attachment テーブルに移動し、id が 38 の attachment オブジェクトを見つけます。このオブジェクトのタイトルは null です。ガイドとして他の添付ファイルのタイトルを使用してタイトルを指定します。異なるエラーの場合も、適切にデータベースを修正してください。
- Once the entry has been corrected, create the XML backup again
- Import the backup into the new version
- If the import succeeds, revert the changes made in http://confluence.atlassian.com/display/DOC/Enabling+detailed+Hibernate+logging to re-enable disable batched updates and turn off log SQL queries and log SQL queries with parameters
- Confluence を再起動します。
この問題の再発を防ぐ方法
- 組み込みデータベースを使用している場合、これは評価用にバンドルされており、突然停電が発生した場合、完全なトランザクションの整合性を提供しないため、本番環境での使用には外部データベースを推奨していることに注意してください。外部データベースに移行する必要があります。
- 最新より前のバージョンの Confluence を使用している場合、この時点でアップグレードを検討する必要があります。
Administrators Guide