|
1 | 1 | --- |
2 | 2 | title: Enterprise Live Migrations CLI reference |
3 | 3 | shortTitle: ELM CLI reference |
4 | | -intro: 'Detailed usage information for the {% data variables.product.prodname_elm_short %} CLI tool.' |
| 4 | +intro: 'Detailed usage information for the {% data variables.product.prodname_elm_cli %} tool.' |
5 | 5 | versions: |
6 | 6 | fpt: '*' |
7 | 7 | ghes: '*' |
8 | 8 | ghec: '*' |
9 | 9 | contentType: reference |
10 | 10 | --- |
11 | 11 |
|
12 | | -{% data reusables.elm.preview-note %} |
| 12 | +## Installation |
13 | 13 |
|
14 | | -## `elm migration` commands |
| 14 | +```shell |
| 15 | +gh extension install github/gh-elm |
| 16 | +``` |
| 17 | + |
| 18 | +The extension requires {% data variables.product.prodname_cli %} (`gh`) version 2.0 or later. |
| 19 | + |
| 20 | +## Setup commands |
| 21 | + |
| 22 | +| Command | Description | |
| 23 | +|-----------------------|----------------------------------------------------------------| |
| 24 | +| `gh elm config` | Interactively configure the endpoints and tokens for ELM use | |
| 25 | +| `gh elm config reset` | Remove stored configuration and credentials | |
| 26 | +| `gh elm config show` | Show the current configuration, with tokens redacted | |
| 27 | +| `gh elm completion` | Generate a shell autocompletion script for the specified shell | |
| 28 | + |
| 29 | + |
| 30 | +## Migration commands |
15 | 31 |
|
16 | 32 | | Command | Description | |
17 | 33 | |---|---| |
18 | | -| `elm migration create` | Creates a new migration for a single source repository | |
19 | | -| `elm migration start --migration-id MIGRATION-ID` | Starts a migration | |
20 | | -| `elm migration status --migration-id MIGRATION-ID` | Shows the status, progress, cutover readiness, and timing of a migration | |
21 | | -| `elm migration list` | Lists all migrations and their statuses | |
22 | | -| `elm migration cancel --migration-id MIGRATION-ID` | Cancels a migration in progress | |
23 | | -| `elm migration cutover-to-destination --migration-id MIGRATION-ID` | Initiates the final cutover, archiving the source repository and completing the migration | |
| 34 | +| `gh elm migration list` | List migrations | |
| 35 | +| `gh elm migration create` | Create a new migration | |
| 36 | +| `gh elm migration start MIGRATION-ID` | Start a previously created migration | |
| 37 | +| `gh elm migration status MIGRATION-ID` | Get the status and details of a migration | |
| 38 | +| `gh elm migration watch MIGRATION-ID` | Watch migration progress with a live-updating display | |
| 39 | +| `gh elm migration pause MIGRATION-ID` | Pause a running migration | |
| 40 | +| `gh elm migration resume MIGRATION-ID` | Resume a paused migration | |
| 41 | +| `gh elm migration cancel MIGRATION-ID` | Cancel and terminate a migration | |
| 42 | +| `gh elm migration target-id MIGRATION-ID` | Look up the target (destination) migration ID for a migration | |
| 43 | +| `gh elm migration cutover MIGRATION-ID` | Initiate a cutover to the destination for a migration | |
| 44 | +| `gh elm migration cutover status MIGRATION-ID` | Get the cutover status and progress for a migration | |
| 45 | +| `gh elm migration cutover revert MIGRATION-ID` | Revert the effects of a cutover so the source repository can be migrated again | |
24 | 46 |
|
25 | 47 | Some of these commands can take additional options. See the later sections in this article. |
26 | 48 |
|
27 | | -## `elm migration create` options |
| 49 | +## Target commands |
| 50 | + |
| 51 | +| Command | Description | |
| 52 | +| ------- | ----------- | |
| 53 | +| `gh elm target mannequin reclaim` | Claim (reclaim) one or more mannequins on the target organization | |
| 54 | +| `gh elm target mannequin list` | List a target organization's mannequins as CSV | |
| 55 | +| `gh elm target report request` | Request a node report for a migration | |
| 56 | +| `gh elm target report status` | Query the status of a migration's node report | |
| 57 | +| `gh elm target report url` | Get a signed download URL for a finished report | |
| 58 | +| `gh elm target resources` | List a migration's resources from the target | |
| 59 | + |
| 60 | +## `gh elm migration create` options |
28 | 61 |
|
29 | 62 | Create a new migration to prepare for repository export and import. |
30 | 63 |
|
31 | | -| Flag | Required | Default | Description | |
32 | | -|---|---|---|---| |
33 | | -| `--source-org` | Yes | N/A | Slug of the source organization on {% data variables.product.prodname_ghe_server %} | |
34 | | -| `--source-repo` | Yes | N/A | Name of the source repository | |
35 | | -| `--target-org` | Yes | N/A | Slug of the destination organization on {% data variables.enterprise.data_residency_site %} | |
36 | | -| `--target-repo` | Yes | N/A | Name of the destination repository | |
37 | | -| `--target-api` | Yes | N/A | {% data reusables.elm.ghe-url-description %} | |
38 | | -| `--pat-name` | Yes | N/A | This must be set to a static string: `system-pat` | |
39 | | -| `--target-visibility` | No | `internal` | Visibility of the destination repository. Must be `private` or `internal`. Public repositories are not supported. | |
40 | | -| `--start` | No | `false` | Automatically starts the migration after creating it | |
41 | | - |
42 | | -## `elm migration list` options |
43 | | - |
44 | | -| Flag | Required | Default | Description | |
45 | | -|---|---|---|---| |
46 | | -| `--status` | No | N/A | Filters results by migration status. Valid values: `created`, `queued`, `in_progress`, `paused`, `completed`, `failed`, `terminated`. | |
47 | | -| `--page-size` | No | N/A | Number of results per page | |
48 | | -| `--after` | No | N/A | Cursor for pagination, from a previous response | |
49 | | - |
50 | | -## `elm migration cutover-to-destination` options |
51 | | - |
52 | | -| Flag | Required | Default | Description | |
53 | | -|---|---|---|---| |
54 | | -| `--migration-id` | Yes | N/A | The ID of a migration that is ready for cutover. | |
55 | | -| `--force` | No | `false` | By default, the command checks whether the migration target reports readiness before proceeding. Use `--force` to bypass this check when you are certain the migration state is correct. | |
56 | | - |
57 | | -## Global flags and variables |
58 | | - |
59 | | -The following properties can be provided either as environment variables or as flags on any command, with command flags taking priority. You should set these values _after_ applying the `ghe-config` configuration. |
60 | | - |
61 | | -| Variable | Flag | Required | Description | |
62 | | -|----------|------|----------|-------------| |
63 | | -| API_URL | `--api-url` | Yes | Must be set to `{% data reusables.elm.localhost-value %}`. | |
64 | | -| MIGRATION_MANAGER_HMAC_KEY | `--migration-manager-hmac-key` | Yes | Must be set to `{% data reusables.elm.hmac-key-value %}`. | |
65 | | -| MIGRATION_TARGET_URL | `--migration-target-url` | Yes | {% data reusables.elm.ghe-url-description %} | |
66 | | -| MIGRATION_TARGET_TOKEN | `--migration-target-token` | Yes | {% data reusables.elm.ghe-pat-description %} | |
67 | | -| DEBUG_HTTP | `--debug-http` | No | Set to `true` to print the HTTP method, URL, headers, and error response body for each request, for debugging purposes | |
| 64 | +| Flag | Required | Default | Description | |
| 65 | +|-----------------------|----------|------------|-------------------------------------------------------------------------------------------------------------------| |
| 66 | +| `--source-org` | Yes | N/A | Slug of the source organization on {% data variables.product.prodname_ghe_server %} | |
| 67 | +| `--source-repo` | Yes | N/A | Name of the source repository | |
| 68 | +| `--target-org` | Yes | N/A | Slug of the destination organization on {% data variables.enterprise.data_residency_site %} | |
| 69 | +| `--target-repo` | Yes | N/A | Name of the destination repository | |
| 70 | +| `--target-visibility` | No | `internal` | Visibility of the destination repository. Must be `private` or `internal`. Public repositories are not supported. | |
| 71 | +| `--start` | No | `false` | Automatically starts the migration after creating it | |
| 72 | +| `--json` | No | `false` | Output the API's raw JSON response instead of human-readable text | |
| 73 | + |
| 74 | +## `gh elm migration list` options |
| 75 | + |
| 76 | +| Flag | Required | Default | Description | |
| 77 | +|---------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------| |
| 78 | +| `--status` | No | N/A | Filters results by migration status. Valid values: `created`, `queued`, `in_progress`, `paused`, `completed`, `failed`, `terminated`. | |
| 79 | +| `--page-size` | No | N/A | Number of results per page | |
| 80 | +| `--after` | No | N/A | Cursor for pagination, from a previous response | |
| 81 | +| `--json` | No | `false` | Output the API's raw JSON response instead of human-readable text | |
| 82 | + |
| 83 | +## `gh elm migration cutover` options |
| 84 | + |
| 85 | +| Flag | Required | Default | Description | |
| 86 | +|------------------|----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 87 | +| `--migration-id` | Yes | N/A | The ID of a migration that is ready for cutover. | |
| 88 | +| `--force` | No | `false` | By default, the command checks whether the migration target reports readiness before proceeding. Use `--force` to bypass this check when you are certain the migration state is correct. | |
| 89 | +| `--watch` | No | `false` | After triggering cutover, enter live watch mode | |
| 90 | + |
0 commit comments