* Add new product to products.yml * Move directory to its new location and rename it * Update new index page * Remove old category from GitHub product index * Add collaboration category * Add membership category * Add roles category * Add teams category * Add team discussion category * Add repo access category * Add project board access category * Add app management category * Add org settings category * Add improved org perms category * Add category for OAuth app restrictions * Add org security category * Add SAML category * Add SAML access category * Add git access category * Add redirects and update links for collaboration category * Add redirects and update links to team discussions content * Add redirects and update links to SAML access category * Update links to org security category and add redirects * Add redirects for app managers content * Add redirects for project board category * Add redirects and update links for the repo access category * Add redirects for git access category * Add redirects and update links for membership category * Add redirects and update links for org settings category * Fix links * Add redirects and update links to org access category * Add redirects and upate links to SSO category * Add redirects to improved org perms category * Add redirects and update links to teams category * Add redirects and update links to oauth apps category * Fix links * Fix links * Fix links
125 lines
8.3 KiB
Markdown
125 lines
8.3 KiB
Markdown
---
|
|
title: Migrations
|
|
redirect_from:
|
|
- /v3/migrations
|
|
- /v3/migration
|
|
- /v3/migration/migrations
|
|
versions:
|
|
free-pro-team: '*'
|
|
topics:
|
|
- api
|
|
---
|
|
|
|
{% 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](/organizations/managing-peoples-access-to-your-organization-with-roles/permission-levels-for-an-organization#permission-levels-for-an-organization)" and "[Other authentication methods](/rest/overview/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`](/developers/webhooks-and-events/webhook-events-and-payloads#repository_import) 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](/rest/overview/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](#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 %}
|