Prerequisites
- You must have completed all previous phases of this guide.
- 移行されるデータと、Importer の既知のサポート制限事項を理解していることを確認します。 For more information, see Understand migrations from Azure DevOps to GitHub.
- 必須ではありませんが、運用環境の移行の間は作業を停止することをお勧めします。 Importer は差分移行をサポートしていないため、移行中に発生した変更は移行されません。 運用環境の移行の間に作業を停止しない場合は、これらの変更を手動で移行する必要があります。
Generate a migration script
複数のリポジトリを GitHub Enterprise Cloud に一度に移行したい場合は、GitHub CLI を使って移行スクリプトを生成します。 結果のスクリプトには、リポジトリごとに 1 つの移行コマンドのリストが含まれます。
メモ
スクリプトを生成すると、PowerShell スクリプトが出力されます。 ターミナルを使っている場合は、.ps1 ファイル拡張子を持つスクリプトを出力し、Mac または Linux 用の PowerShell をインストールして実行する必要があります。
To generate a migration script, run the gh ado2gh generate-script command.
gh ado2gh generate-script --ado-org SOURCE --github-org DESTINATION --output FILENAME
gh ado2gh generate-script --ado-org SOURCE --github-org DESTINATION --output FILENAME
上のコマンドのプレースホルダーを次の値に置き換えます。
| プレースホルダー | 値 |
|---|---|
| SOURCE | 移行元の Organization の名前 |
| DESTINATION | 移行先の Organization の名前 |
| FILENAME | 結果の移行スクリプトのファイル名 ターミナルを使っている場合は、生成されたスクリプトの実行に PowerShell が必要なので、 .ps1 ファイル拡張子を使います。 Mac 用または Linux 用の PowerShell をインストールできます。 |
Additional arguments
| Argument | Description |
|---|---|
--target-api-url TARGET-API-URL | GHE.com に移行する場合は、--target-api-url TARGET-API-URL を追加します。TARGET-API-URL は Enterprise のサブドメインのベース API URL です。 (例: https:/)。 |
--all | Add additional functionality to the script, such as rewiring pipelines, creating teams, and configuring Azure Boards integrations. |
--download-migration-logs | Download the migration log for each migrated repository. For more information about migration logs, see GitHub Enterprise Importer の移行ログへのアクセス. |
Reviewing the migration script
スクリプトを生成したら、ファイルを確認し、必要に応じてスクリプトを編集します。
- 移行したくないリポジトリがある場合は、対応する行を削除するかコメントにします。
- 移行先の Organization でリポジトリに別の名前を使う場合は、対応する
--target-repoフラグの値を更新します。 - 新しいリポジトリの可視性を変更する場合は、対応する
--target-repo-visibilityフラグの値を更新します。 既定では、スクリプトはソース リポジトリと同じ表示範囲を設定します。
Perform a trial run
企業固有の問題を明らかにするために、移行の試用を実行することを強くお勧めします。 試用版の実行では、次の内容について学習します。
- 特定のリポジトリの移行が正常に完了できるかどうか。
- 移行されたリポジトリを実行可能な状態に戻すことができるかどうか。
- 移行の実行にかかる時間。
試用版の実行はいつでも実行でき、移行中に作業を停止する必要はありません。 試験的移行の完了にかかる時間を短縮するには、試験的実行のバッチを連続してスケジュールできます。 それらのリポジトリのユーザーは、都合のよいときに結果を検証できます。
-
Create a test organization for your trial migrations.
You can use a single organization for all trial runs, or you can create one test organization for each intended destination organization. Consider including
-sandboxat the end of the organization names, to clarify that the organizations are intended only for migration validation and not for production. You can delete the test organizations after you're done. -
Run the trial migrations.
-
Confirm that you are able to complete the follow-up tasks in Follow-up tasks.
-
Ask users to validate the results of the migrations.
-
Resolve any issues uncovered by your trial migrations.
-
必要に応じて、テスト用の Organization を削除します。
Migrate repositories
If your trial run was successful, and you were able to complete the follow-up tasks, you can proceed to the real migration.
警告
We recommend halting work in the repositories you are migrating. Any changes made during or after the migration will need to be manually migrated.
複数のリポジトリを移行するには、生成したスクリプトを実行します。 次のコマンドの FILENAME を、スクリプトの生成時に指定したファイル名に置き換えます。
-
ターミナルを使っている場合は、
./を使います。Shell ./FILENAME
./FILENAME -
PowerShell を使っている場合は、
.\を使います。Shell .\FILENAME
.\FILENAME