How to re-install/re-register a single Bitbucket Smart Mirror

お困りですか?

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

コミュニティに質問

プラットフォームについて: Data Center のみ - この記事は、Data Center プラットフォームのアトラシアン製品にのみ適用されます。

この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

After experiencing an issue with a Bitbucket Smart Mirror, at times it may be appropriate to remove the existing data/configuration on the mirror and attempt re-registering it with the upstream server.

As mirrors are read-only, the process for resetting a mirror is non-destructive and can be accomplished fairly quickly - with the largest wait time only being the initial synchronization of the desired repositories back to the mirror after completing the steps below. 

環境

  • Bitbucket Data Center 
  • Individual smart mirror(s) in use

ソリューション

All of the steps below (except for the first and last step) are applicable only to the mirror server.

None of these steps relating to the Bitbucket home should be performed on the upstream/primary Bitbucket instance.

  1. Delete the mirror connection on the front-end of the primary/upstream Bitbucket instance by navigating to Administration → Mirrors → <Mirror Name> → Delete
  2. Stop the service of the mirror on the mirror server
  3. On the filesystem of the mirror, navigate to the "$BITBUCKET_HOME/shared" directory and move/backup the config directory.
    • (info) The data directory is safe to delete, as the data there is just a copy of what's on the upstream. The config directory, though, can contain the Java Keystore being used by the mirror as well as the SSH key used for identifying the mirror to SSH clients - so we recommend backing that directory up.
  4. After backing up the config directory, delete the following data/config directories on the mirror:
    • $BITBUCKET_HOME/shared/data
    • $BITBUCKET_HOME/shared/config
      • (info) Using a command like the following can help retain the ssl-keystore file and SSH key mentioned in the previous step: 
      • find ./config -not -name 'ssl-keystore' -not -name 'ssh-server-keys.pem' -delete
  5. Start the mirror, and go through the setup screen to re-add it to the primary Bitbucket instance.
  6. On the upstream, navigate to the mirror and add the desired projects to be mirrored.

Once the projects have completed their initial synchronization, you should be good to go!

Otherwise, if you continue to experience issues with your mirror - it's recommended that your team review our mirror troubleshooting guide or reach out to our support team for further assistance.

最終更新日: 2021 年 1 月 5 日

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

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