> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/ja/mentenansu/upgrading-your-deployment.md).

# デプロイメントのアップグレード

{% hint style="danger" %}
必ず次のものを取得することが重要です： [整合性のあるバックアップ](/on-premises/ja/mentenansu/data-and-backups.md#performing-a-consistent-backup) **前に** ロールバックが必要になった場合に備え、メジャーバージョンをアップグレードするたびに取得してください。
{% endhint %}

次の [Overleaf Toolkit↗](https://github.com/overleaf/toolkit) は git リポジトリなので、新しい Toolkit の機能を簡単に取り込むことができます。以下の `bin/upgrade` コマンドを実行し、画面上の指示に従ってください。

Docker イメージのバージョン（ `config/version`）は Toolkit のコード更新とは別に管理されています。Toolkit のコードを更新すると **しないでください** 実行中の Docker イメージのバージョンが自動的に変更されます。つまり、ほとんどの場合、デプロイメントを更新しなくても Toolkit のバージョンをアップグレードできます。

#### 次の `bin/upgrade` スクリプト

次の `bin/upgrade` コマンドを実行すると、スクリプトは Toolkit コードに利用可能な更新があるかを確認し、Toolkit の更新を提案します。このアップグレードはいつでも拒否でき、その場合は何も変更されません。

Toolkit コードの更新を選択した場合、スクリプトは次に *デフォルトの* Docker イメージのバージョンが変更されたかを確認し、ローカルのバージョンファイル（ `config/version`）を新しいデフォルトに合わせてアップグレードすることを提案します。

バージョンの切り替えを選択した場合、スクリプトは Docker サービスの停止、バックアップの作成、Docker サービスの再起動という手順を案内します。古いバージョンファイルは自動的に `config/__old-version`にコピーされます。Docker イメージをそのバージョンに戻す必要がある場合に備えてです。

{% hint style="danger" %}
Server CE/Pro のアップグレードを実施する際は、デプロイ済みメジャーバージョンの最新リリースにアップグレードすることをお勧めします **前に** の最新リリースへアップグレードする **次の** メジャーバージョン。デプロイメントが最新バージョンより 2 つ以上のメジャーバージョン遅れている場合は、複数段階のアップグレードを実施する必要があります。

たとえば、3.5.10 を実行している場合は、3.5.13 -> Full Project History の移行を実施 -> 4.2.9 -> 5.5.4 の順にアップグレードする必要があります。

次の場合にのみ **決して** メジャーバージョンをスキップしないでください（3.5.10 -> 5.5.4）。Toolkit を使用しており、最新バージョンより 2 つ以上のメジャーバージョン遅れている場合は、 **しないでください** を使用 `bin/upgrade` スクリプトは使用しないでください。手動で複数段階のアップグレードを実施する必要があります。
{% endhint %}

{% hint style="info" %}
Docker イメージを手動で取り込むエアギャップ構成では、次を設定してください。 `PULL_BEFORE_UPGRADE=false` の `config/overleaf.rc` ファイル。

次をご確認ください [こちら](/on-premises/ja/insutru/air-gapped-offline-deployments.md) エアギャップ／オフライン環境でのデプロイに関する詳細情報を。
{% endhint %}

### アップグレード手順 <a href="#upgrade-path" id="upgrade-path"></a>

次の `bin/upgrade` コマンドは、その時点で利用可能な Server Pro/CE の最新バージョンを常に選択します。アップグレードの頻度が低い場合、メジャーバージョンを飛ばしてしまい、想定していなかったバージョンにアップグレードされる可能性があります。

アップグレードを行う際は、次のメジャーバージョンの最新リリースに上げる前に、現在のメジャーバージョンの最新リリースへアップグレードすることをおすすめします。たとえば、現在 3.3.2 を実行していて、利用可能な最新バージョンが 5.3.1 の場合、正しいアップグレード手順は次のとおりです:

* 3.3.2 -> 3.5.13
* 3.5.13 -> 4.2.9
* 4.2.9 -> 5.5.1

アップグレード時の問題を避けるため、次を参照されることをおすすめします。 [リリースノート](https://docs.overleaf.com/on-premises/release-notes) 一部のバージョンでは追加手順が必要になる場合があるため、アップグレードを行う前に必ず確認してください。たとえば、Toolkit に手動変更を加える、データベースをアップグレードする、または移行スクリプトを実行するといった作業です。

まだ登録していない場合は、次の [メーリングリスト](https://mailchi.mp/overleaf.com/community-edition-and-server-pro) に登録して、新しいバージョン／更新がリリースされたときに通知を受け取れるようにしてください。これにより、リリーススケジュールに合わせた定期メンテナンスの時間を計画できます。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/on-premises/ja/mentenansu/upgrading-your-deployment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
