> 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/data-and-backups/exporting-projects.md).

# プロジェクトのエクスポート

Server Pro と Community Edition では `5.4.0` 管理者がすべてのユーザープロジェクトをエクスポートできるスクリプトを含めています（まだ **削除済み** および **ゴミ箱** フォルダー）をディスク上のディレクトリに書き出せます。

{% hint style="info" %}
このスクリプトを実行した結果は、ユーザーのプロジェクトダッシュボードからすべてのプロジェクトの Zip を手動でダウンロードした場合と同じです。スクリプトは、エクスポートにプロジェクトの最新バージョンが含まれるよう、ダウンロードを開始する前に保留中の変更をすべて反映します。
{% endhint %}

### 制限事項

エクスポートスクリプトには次の制限があります:

* TeX Live のイメージ名やコンパイラなどのプロジェクト設定はエクスポートされません。これらは、プロジェクトをユーザーのアカウントにアップロードする際に設定する必要があります。
* エクスポートされたプロジェクトにはバージョン履歴は含まれません。
* コラボレーター情報は保持されません。プロジェクトは再共有する必要があります。リンク共有を使用している場合、閲覧リンクと編集リンクは再生成されます（以前と同じものにはなりません）。
* コメントや変更履歴情報はエクスポートされません。
* プロジェクトのチャット履歴はエクスポートされません。

{% hint style="danger" %}
このスクリプトは **適していません** システム全体のバックアップの代わりとして設計されています。災害復旧シナリオでインスタンスを復元できるよう、私たちは **強く** 〜を取ることを推奨します [整合性のあるバックアップ](https://docs.overleaf.com/on-premises/maintenance/#performing-a-consistent-backup).
{% endhint %}

### **フラグ**

| 名前             | 説明                                                               |
| -------------- | ---------------------------------------------------------------- |
| `--help`       | ヘルプを表示                                                           |
| `--user-id`    | ユーザーID（次を使用しない限り必須 `--export-all` または `--project-id`)            |
| `--project-id` | 単一のプロジェクトをエクスポート（**使用** できません `--user-id` または `--export-all`)    |
| `--list`       | ユーザーのプロジェクトを一覧表示（**使用** できません `--output`)                        |
| `--output`     | 出力 Zip ファイル（単一のエクスポート操作用）                                        |
| `--export-all` | すべてのユーザーのプロジェクトをエクスポート（次が必要 `--output-dir`)                      |
| `--output-dir` | すべてのユーザーのエクスポートファイルを保存するディレクトリ                                   |
| `--log-level`  | サポートされるログレベル: `trace`\|`debug`\|`info`\|`warn`\|`error`\|`fatal` |

### **使い方**

すべてのユーザーのプロジェクトをエクスポートするには、次のコマンドを使用します:

{% code overflow="wrap" %}

```bash
# Overleaf Toolkit を使用しているユーザー
$ bin/docker-compose exec sharelatex /bin/bash -ce "cd /overleaf/services/web && node modules/server-ce-scripts/scripts/export-user-projects.mjs --export-all --output-dir=/var/lib/overleaf/data/exports"

# 従来の docker-compose.yml を使用しているユーザー
docker exec sharelatex /bin/bash -ce "cd /overleaf/services/web && node modules/server-ce-scripts/scripts/export-user-projects.mjs --export-all --output-dir=/var/lib/overleaf/data/exports"
```

{% endcode %}

{% hint style="info" %}
Server Pro または Community Edition <= 3.5.13 を使用している場合は、上記の例を次のものを使用するよう更新する必要があります: **`export-legacy-user-projects.js`** スクリプト。
{% endhint %}

### **完了**

エクスポートが完了したら、ホスト上の次の場所に bind mount されたディレクトリ経由でファイルにアクセスできます: **/var/lib/overleaf** の **docker-compose.yml** ファイル、または `OVERLEAF_DATA_PATH` の環境変数 **config/overleaf.rc** ファイル。Toolkit を使用している場合。

{% hint style="info" %}
Overleaf では現在、重複したプロジェクト名が許可されています。ユーザーのプロジェクトに重複が含まれている場合でも、これらのプロジェクトはユーザーの Zip エクスポートに追加されますが、展開すると 1 つのバージョンしか存在しません。Linux では、 `unzip -B` 同名のファイルを上書きせず、バックアップファイルとして書き出します。
{% endhint %}


---

# 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/data-and-backups/exporting-projects.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.
