1
0
mirror of synced 2025-12-22 19:34:15 -05:00
Files
docs/content/rest/reference/migrations.md
Jason Etcovitch caaee7a124 Update all files to use {% data %} (#15253)
* Add back changes from prior to purge

* Manually fix some invalid Liquid

* Updoot render-content

* Improve test messages to show correct output

* Run el scripto

* Pass the remaining test
2020-09-29 16:01:04 -04:00

8.3 KiB

title, redirect_from, versions
title redirect_from versions
Migrations
/v3/migrations
/v3/migration
/v3/migration/migrations
free-pro-team
*

{% for operation in currentRestOperations %} {% unless operation.subcategory %}{% include rest_operation %}{% endunless %} {% endfor %}

Organization

The Migrations API is only available to authenticated organization owners. For more information, see "Permission levels for an organization" and "Other authentication methods."

{% data variables.migrations.organization_migrations_intro %}

{% for operation in currentRestOperations %} {% if operation.subcategory == 'orgs' %}{% include rest_operation %}{% endif %} {% endfor %}

Source imports

{% data variables.migrations.source_imports_intro %}

A typical source import would start the import and then (optionally) update the authors and/or update the preference for using Git LFS if large files exist in the import. You can also create a webhook that listens for the RepositoryImportEvent to find out the status of the import.

A more detailed example can be seen in this diagram:

+---------+                     +--------+                              +---------------------+
| Tooling |                     | GitHub |                              | Original Repository |
+---------+                     +--------+                              +---------------------+
     |                              |                                              |
     |  Start import                |                                              |
     |----------------------------->|                                              |
     |                              |                                              |
     |                              |  Download source data                        |
     |                              |--------------------------------------------->|
     |                              |                        Begin streaming data  |
     |                              |<---------------------------------------------|
     |                              |                                              |
     |  Get import progress         |                                              |
     |----------------------------->|                                              |
     |       "status": "importing"  |                                              |
     |<-----------------------------|                                              |
     |                              |                                              |
     |  Get commit authors          |                                              |
     |----------------------------->|                                              |
     |                              |                                              |
     |  Map a commit author         |                                              |
     |----------------------------->|                                              |
     |                              |                                              |
     |                              |                                              |
     |                              |                       Finish streaming data  |
     |                              |<---------------------------------------------|
     |                              |                                              |
     |                              |  Rewrite commits with mapped authors         |
     |                              |------+                                       |
     |                              |      |                                       |
     |                              |<-----+                                       |
     |                              |                                              |
     |                              |  Update repository on GitHub                 |
     |                              |------+                                       |
     |                              |      |                                       |
     |                              |<-----+                                       |
     |                              |                                              |
     |  Map a commit author         |                                              |
     |----------------------------->|                                              |
     |                              |  Rewrite commits with mapped authors         |
     |                              |------+                                       |
     |                              |      |                                       |
     |                              |<-----+                                       |
     |                              |                                              |
     |                              |  Update repository on GitHub                 |
     |                              |------+                                       |
     |                              |      |                                       |
     |                              |<-----+                                       |
     |                              |                                              |
     |  Get large files             |                                              |
     |----------------------------->|                                              |
     |                              |                                              |
     |  opt_in to Git LFS           |                                              |
     |----------------------------->|                                              |
     |                              |  Rewrite commits for large files             |
     |                              |------+                                       |
     |                              |      |                                       |
     |                              |<-----+                                       |
     |                              |                                              |
     |                              |  Update repository on GitHub                 |
     |                              |------+                                       |
     |                              |      |                                       |
     |                              |<-----+                                       |
     |                              |                                              |
     |  Get import progress         |                                              |
     |----------------------------->|                                              |
     |        "status": "complete"  |                                              |
     |<-----------------------------|                                              |
     |                              |                                              |
     |                              |                                              |

{% for operation in currentRestOperations %} {% if operation.subcategory == 'source-imports' %}{% include rest_operation %}{% endif %} {% endfor %}

User

The User migrations API is only available to authenticated account owners. For more information, see "Other authentication methods."

{% data variables.migrations.user_migrations_intro %} For a list of migration data that you can download, see "Download a user migration archive."

To download an archive, you'll need to start a user migration first. Once the status of the migration is exported, you can download the migration.

Once you've created a migration archive, it will be available to download for seven days. But, you can delete the user migration archive sooner if you'd like. You can unlock your repository when the migration is exported to begin using your repository again or delete the repository if you no longer need the source data.

{% for operation in currentRestOperations %} {% if operation.subcategory == 'users' %}{% include rest_operation %}{% endif %} {% endfor %}