Backing Up Data
This page describes how to back up your JIRA data, and establish processes for maintaining continual backups. Backing up your JIRA data is the first step in upgrading your server to a new JIRA revision, or splitting your JIRA instance across multiple servers. See also Restoring JIRA data and Restoring a Project from Backup.
Jira の完全なバックアップの作成は、2 段階で行われます。
1. データベース コンテンツのバックアップ
ネイティブなデータベース バックアップ ツールか、Jira の XML バックアップ ユーティリティを使用できます。
本番環境で使用する場合、定期的なバックアップには、Jira の XML バックアップ サービスではなくネイティブなデータベース バックアップツール を使用することを強く推奨します。
Jira が使用中の場合、バックアップの処理中にデータベースが更新される可能性があるため、XML バックアップの整合性が保証されません。不整合のある XML バックアップが生成されても、Jira アプリケーションが警告やエラー メッセージを報告することはなく、このような XML バックアップは復元時に失敗します。ネイティブなデータベース バックアップ ツールは、整合性と信頼性により優れたデータ保存 (および復元) を Jira の処理中に行う手段を提供します。
警告: インスタンスを移行する場合、可能であれば、このガイドの指示にしたがって XML バックアップを作成することをおすすめします。非常に大きなサイズのインスタンスなどの特定の事例では、XML バックアップのシステム要件により、バックアップが不可能である場合があります。
ネイティブなデータベース バックアップ ツールの使用
あらゆる重大なデータベースに、データベースをバックアップおよび復元するためのツールが付属します (RDBMS の「MS」)。以下のように、XML バックアップ オプションの設定ではこれらのツールを強くお勧めします。
- 単一時点でバックアップを取ることによって、データベースの整合性を確保します。
- Jira の XML バックアップより処理が速く、消費リソースも少なくなります。
- 既存のバックアップ戦略と連携できます (例: データベースを使用するすべてのアプリケーションで 1 回のバックアップ実行を許可)。
- インクリメンタル (「フル」ではなく) バックアップを実現し、ディスク スペースを節約します。
- Jira がバックアップ形式として XML を使用することに関連する、文字エンコーディングやフォーマットの問題を防ぎます。
See the documentation for your database on how to set up periodic backups. This typically involves a cron job or Windows scheduled task invoking a command-line tool like mysqldump or pg_dump .
Jira の XML バックアップ ユーティリティの使用
一回のみのバックアップを実行するには (例: アップグレード前)、次の手順に従います。
You can also configure scheduled XML backups, as described in Automating JIRA Backups.
- Log in as a user with the 'JIRA System Administrators' global permission.
- Choose > System. Select Import & Export > Backup System to open the Backup JIRA data page.
Keyboard shortcut: 'g' + 'g' + type 'backup'
Screenshot: The Backup JIRA Data Page
As shown in the screenshot above, the backup will be stored within the
export
subdirectory of the JIRA Home Directory. - In 'File name' field, type the name of the backup file.
Ensure that JIRA has the necessary file system permissions to write to this location. See the relevant procedures in the JIRA Installation and Upgrade Guide for details on creating a dedicated operating system account to run JIRA.
- Click the 'Backup' button and wait while your JIRA data is backed up.
JIRA will save your XML backup as a zipped archive file.
- バックアップが完了すると、Jira がデータを指定のファイルに書き込んだことを確認するメッセージが表示されます。
2. data
ディレクトリをバックアップする
The data
directory is a sub-directory of your JIRA Home Directory. It contains application data for JIRA, e.g. if you have attachments enabled, all files attached to JIRA issues are stored in the data\attachments
directory (not in the database).
To back up the data
directory, you need to create a snapshot of the data
directory (including all files and subdirectories), then back up the snapshot. Note that the directory structure under the data
directory must be preserved in the snapshot.
Creating this snapshot is an operating system-specific task, e.g.:
- MS Windows では、ディレクトリをコピーするバッチ スクリプトを記述し、定期的なスケジュールを作成できます ([プログラム] > [アクセサリ] > [システムツール] > [スケジュール作成済みのタスク])。
- On Linux/Solaris, it is best to write a small shell script, placed in
/etc/cron.daily
, backing up files to a directory like/var/backup/jira
. It is best to copy an existing script in/etc/cron.daily
to ensure local conventions (file locations, lockfiles, permissions) are adhered to.
Your "attachments" directory may be located elsewhere
If you have put your attachments
directory in a custom location (see Configuring File Attachments) rather than inside the data
directory, you will also need to back up your attachments
directory using the snapshot method described above.