データの復元とバックアップ

このページの内容

お困りですか?

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

コミュニティに質問

This page provides an overview of the backup and restore options available for use with Bitbucket Server and Data Center:

Questions? Check out FAQ - Data recovery and backup.

Bitbucket backup essentials

有効なバックアップ計画が不可欠です。

  • for avoiding data loss in the event of any system breakdown,
  • for restoring Bitbucket after any system breakdown,
  • as part of the Bitbucket upgrade process.

We highly recommend that you establish a data recovery plan that is aligned with your company's policies. At the very least, you should consider these aspects:

  • How frequently should Bitbucket be backed up? We recommend that backups are made at least daily.
  • How much downtime is acceptable? When using a backup strategy with any downtime we recommend scheduling backups at a time of day that minimizes impact on users, e.g., out of office hours.
  • How long should backups be retained for? We recommend that backups be retained for at least one month.
  • Where should the backups be stored? We recommend that backups are stored at an offsite location.
  • How quickly and easily can you restore your data in an emergency? We recommend restoring your backups in a staging environment on a regular basis to ensure that your backup strategy works in the event of a real emergency scenario.

The importance of being consistent

All backup strategies for Bitbucket need to capture the state of two fundamental data sources:

  • The home directory on the file system, which contains your repository data, log files, plugins, and so on (see Bitbucket Server home directory for more detail).
  • The database, which contains data about pull requests, comments, users, groups, permissions, and so on.

These two data sources hold the entire state of a Bitbucket instance. To backup the complete state of your instance, you need to take consistent snapshots of both using one of the strategies below. If you attempt to restore snapshots containing inconsistencies then there is a risk of corruption or data loss in your repositories and pull requests.

(In addition, if you have a remote Elasticsearch instance then search indexes are maintained in Elasticsearch's data directory, but you don't have to include this in your backup as it can be completely rebuilt if necessary from the data in your home directory and database.)

Bitbucket のバックアップ計画

Bitbucket provides multiple strategies for taking backups free of inconsistencies, and each are summarized in the table below. Each option has tradeoffs between technical requirements and the amount of downtime involved. Which strategy you choose depends on the scale of your instance, your file system and database technologies, your recovery point objective, and your users' tolerance of downtime when backups are taken.


ゼロ ダウンタイム バックアップ DIY Backup Backup Client
要約 A technique that eliminates downtime completely using internally consistent database snapshots and block-level filesystem snapshots 増分コピーまたはベンダー固有のスナップショット テクノロジーを使用してダウンタイムを最小化する手法

Simple but unsuitable for use in high availability environments.

An external utility which locks a Bitbucket Server instance and backs up its entire home directory and database in a vendor-independent format.

Downtime (tick) Zero at backup time.

(warning) Low. Only needs to lock Bitbucket briefly to create a consistent snapshot. Downtime can be as low as a few seconds.

(error) 高。Bitbucket はバックアップ プロセスの全期間を通じてロックされます。特に大規模な組織の場合、バックアップには数分以上かかる場合があります。

Minimum product version Bitbucket 4.8+

Stash 2.12 〜

Bitbucket 4.0+

Stash 2.7 〜

Bitbucket 4.0+

Bitbucket Server (tick) Supported. Bitbucket tolerates (but does not attempt to resolve) any inconsistencies between the home directory and database after restoring. (tick) サポート対象 (tick) サポート対象
Bitbucket Data Center (tick) Supported. Bitbucket can perform an integrity check at restore time to scan for inconsistencies between the home directory and database, and resolve them. (tick) サポート対象 (error) Not supported, even if you are running on one cluster node.
Minimum requirements
  • Requires you to use the snapshot tools of your file system and database vendor. Example scripts are provided.
  • Requires your home directory to be on a file system volume capable of atomic (block level) snapshots, for example, Amazon EBSLVMNetAppXFS, or ZFS.
  • データベースとファイルシステムのスナップショットを取得する時間を最小化する (またはベンダー固有のポイント イン タイム リカバリを使用する) ことで、不整合が発生する可能性を低減します。

Requires you to use the snapshot tools of your file system and database vendor. Example scripts are provided.

No special requirements. "Just works" out of the box.
Backup format ベンダー固有のデータベース スナップショットと全ディスク ボリュームのブロック レベルのファイルシステム スナップショット。 Vendor-specific database dump and file system snapshot.

Database vendor-independent.

関連ドキュメント Using Bitbucket zero downtime backup Bitbucket Server DIY Backup を使用する Bitbucket Server Backup Client を使用する


更に詳しい情報

Using Bitbucket zero downtime backup

Bitbucket Server DIY Backup を使用する

Bitbucket Server Backup Client を使用する

最終更新日 2018 年 5 月 28 日

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

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