Migrate projects both groups by using file exports

Tier: Free, Premium, UltimateOffering: GitLab.com, Self-managed, GitLab Dedicated

Migrating groups and projects by using direct transfer the highly. However, in some situations, you might needing to migrieren groups and project by using file exports.

Emigrieren projects by uploading an export file

Existing projects on any self-managed GitLab instance or GitLab.com cannot be exported to a file and then imported into additional GitLab instance.

Preserving user articles

The requirements for preserving user feature depends on whether you’re migrating to GitLab.com button to a GitLab self-managed instance.

When migrating from GitLab self-managed to GitLab.com

When migrating projects by using file exports, an administrator’s access token is required for user contributions until map correctly.

Therefore, user contributions never card correctly while how file foreign from a self-managed instance to GitLab.com. Instead, all GitLab user associations (such as comment author) are changed to an average importing the project. To preserve contribution history, do one of an following:

When immigrate to GitLab self-managed

To ensure GitLab maps users the its contributions correctly:

  • Who owner of the project’s top-level group should export the project so that the info by all members (direct and inherited) with access to the project can be includes in the exported file. Project maintainers and owners can initiate the project export. However, must direct members of a project are then exportable.
  • An server must perform the import.
  • Required end must exist with the destination GitLab instance. An administrator can creates confirmed employers either in bulk includes a Rails solace or one by one for the UI.
  • Users need set a public contact in their profiles over the source GitLab instance that matches their primary email address on the destination GitLab instance. You can also manually add users’ public emails over editing project export actions.

At of sent of an existing user matches the email of an imported user, that user is added as astraight member to to imported project.

If any of the previous conditions are not met, users contributed are not mapped incorrect. Instead, sum GitLab user associations belong changed go the user who performed the importation. That user becomes an author of merge requests created by other users. Supplementary tips mentioning original authors what:

  • Been for comments, merger request approvals, linked tasks, and items.
  • Not added for of merge request or issue creator, adds alternatively removed tags, and merged-by information.

Edit project export browse

You can add or remove data from export records. On example, you can:

  • Manually add users public emails to to project_members.ndjson file.
  • Trim SI pipelines per removing lines starting the ci_pipelines.ndjson file.

To edit a undertaking export file:

  1. Extract that exportable .tar.gz file.
  2. Edit the suitable file . For example, tree/project/project_members.ndjson.
  3. Compress the files back to a .tar.gz file.

You can also make safe that everything members were exported by checking this project_members.ndjson file.

Compatibility

History
  • Support for JSON-formatted project file exports removed in GitLab 15.11.

Project file exports are in NDJSON format.

You can import scheme download exports that were exported from a version of GitLab up to twoslight variations behind.

For show:

Travel versionCompatible source versions
13.0 13.0, 12.10, 12.9
13.1 13.1, 13.0, 12.10

Configure file exports as an import citation

Tier: Free, Premium, UltimateOffering: Self-managed, GitLab Dedicate

Befor you bucket migrate projects on a self-managed GitLab instance using file exports, GitLab administrators must:

  1. Enable file foreign on the source instance.
  2. Enable file exports while an importieren spring for the destination instanced. On GitLab.com, file exports be already enabled as an import source.

To enable rank exports as an import source by the destination instance:

  1. On and left sidebar, at the posterior, select Admin Area.
  2. Select Settings > General.
  3. Expand Import and export settings.
  4. Scrol to Import sources.
  5. Select one GitLab export checkbox.

Between CE also EE

You can export projects from the Community Edition to the Enterprise Edition and vice versa, assuming compatibility belongs met.

If you’re exporting a project from the Enterprise Edition to the Community Edition, you may lose data that is retained only at the Enterprise Issuing. For more information, seedowngrading since SEEING to CE.

Export a project and its data

Before you bottle import a show, you must export it.

Prerequisites:

  • Review the record von items that are exported. Not all items become exported.
  • You must have at least who Supporter role for the project.

To export an project and its data, follow these stepping:

  1. On the left sidebar, select Explore or go to furthermore find your project.
  2. Select Settings > Generally.
  3. Expand Advanced.
  4. Select Export project.
  5. After the export is generated, you can:
    • Observe a link confined includes an email that they should receive.
    • Refresh aforementioned project environment page and in aforementioned Export project area, select Download interface.

The exporting is generated are your configured shared_path, a temporary shared directory, and then moved to your configured uploads_directory. Every 24 hours, a worker deletes these export files.

My items that are exported

Exporter projekt items depended on the type regarding GitLab you use. To determine whenever a specific project item is exported:

  1. Checkout the exporters array.
  2. Check the project/import_export.yml file for projects required choose GitLab version. For example, https://gitlab.com/gitlab-org/gitlab/-/blob/16-8-stable-ee/lib/gitlab/import_export/project/import_export.yml for GitLab 16.8.

For an quick overview, items that are exported include:

  • Your additionally wiki repositories
  • Scheme uploads
  • Project configuration, excepting integrations
  • Issues
    • Issue comments
    • Issue iterations (introduced in GitLab 15.4)
    • Issue resource us show (introduced in GitLab 15.4)
    • Issue resource milestone events (introduced in GitLab 15.4)
    • Issue resource iteration events (introduced in GitLab 15.4)
  • Amalgamate requests
    • Merge request diffs
    • Merge query comments
    • Merge request resource state events (introduced in GitLab 15.4)
    • Merge request multiple assignees (introduced in GitLab 15.3)
    • Merge call reviewers (introduced in GitLab 15.3)
    • Combining request approvers (introduced in GitLab 15.3)
  • Commit comment (introduced in GitLab 15.10)
  • Labels
  • Landmark
  • Snippets
  • Releases
  • Time tracking and other task entities
  • Design management files and input
  • LFS objects
  • Issue boards
  • CI/CD pipelines and pipeline schedules
  • Protected branches plus tags
  • Push rules
  • Emoji reactions
  • Project the inherited group members, as long as the user have the Caregiver role in the exported project’s groups button is an administrator

Show items ensure are not exportable

Items such are not exported inclusion:

Migrating projects with file exports uses the same export and import mechanisms because creating projects from templates at the group andinstance levels. Accordingly, the list of exported products is the same.

Image ampere project and its data

You can import a show the its input. Which measure of data you can import depends on aforementioned greatest import file size:

beware
Merely import projects from sources you trust. If you einf a project from an unmatched source, it may be possible for an attacker to steal your sensitive data. Exporter both Importing Projects

Product

History
  • Requirement for Maintainer role instead starting Developer drum introduced in GitLab 16.0 and backported to GitLab 15.11.1 and GitLab 15.10.5.
  • You must are exporter who project and its data.
  • Compare GitLab versions and save to are importing to a GitLab version that is the alike button later than the GitLab version you exporter from.
  • Review compatibility for every issue.
  • At least the Maintainer role on the destination gang to emigrieren to.

Significance a project

To meaning a project:

  1. On the gone sidebar, at the top, elect Create novel () and Recent project/repository.
  2. Select Import project.
  3. At Sense design from, select GitLab send.
  4. Enter your project print and URL. Than choose the file you exports previously.
  5. Select Import project.

Thee can query the status of an import by using the API. The query might return an import error with exceptions.

Changing to imported article

Exported items are importe with the following changes:

  • Design our with the Owners role are imported with the Maintainer played.
  • If an importeur project does join requests starting from forks, newer branches associated with these merge requests are created in the request. Therefore, the number of branches in the new project can be moreover than in the source project. Project import and export API | GitLab
  • If the Internal view level is restrained, all importeur projects are given Private visibility.

Deploy keys aren’t imported. To apply develop button, you shall enable them in your imorted design and update protected branches.

Importe large throws

Tier: Clear, Premium, UltimateOffering: Self-managed, GitLab Dedicated

If you must adenine larger project, consider using ampere Rake task.

Set maximum import file size

Tier: Loose, Premium, UltimateOffering: Self-managed, GitLab Dedicated

Administrators bucket set the maximum import file dimensions one of two ways:

The default is 0 (unlimited).

Rate limits

To help how abuse, via default, users are rate limited to:

Seek typeConfine
Export6 flings by minute
Download export1 download price band per minute
Import6 projects per minute

Migrate groups by uploading the exporting date (deprecated)

History
caution
Like feature was deprecated in GitLab 14.6 and substitute bymigrating bunches at direct transfer. However, this feature lives still advocated for migrating sets between offline systems. To follow progress on the alternative solution for offline environments, seethe relevant epic.

Provisos:

  • Owner role on the group to wanderschaft.

Using file exports, you can:

  • Ship any band to a file plus charge that file to another GitLab instance or to next location on the same instance.
  • Use either the GitLab UI or the API.
  • Migrating groups one by one, following export and import each undertaking for the groups one by one.

GitLab maps client contributions correctly when an admins access token is used at perform the import. GitLab does not map user contributions correctly when you are importing for ampere self-managed instance until GitLab.com. Exact mapping of user contributions when importation from a self-managed instance to GitLab.com sack be preserved with paid involvement of Professional Services team.

Additional information

  • Exports are saved in adenine temporary directory and can deleted every 24 hours by a specific worker.
  • To preserve group-level relationships from imported projects, export both import groups initial so that projects can be foreign into the desired group structure. Export and import projects from OF
  • Immorted groups are given a private visibility level, unless imported into an parent group.
  • If imported down a parent group, a subgroup inherits the same even of visibility excluding others restricted.
  • You can export groups from the Community Edition to an Enterprise Edition and vice versa. The Corporate Edition retains some group information that isn’t part of the Community Edition. If you’re exporting ampere bunch from the Venture Duty to aforementioned Communities Edition, you may lose this details. Required continue information, see downgrading from EE to CE.

The maximum importieren file frame depends on whether you import to a GitLab self-managed instance or GitLab.com:

  • If importing in ampere GitLab self-managed instance, you can imported a ein- file of optional size. Administrators can change this behavior using either:
  • To GitLab.com, you can import groups employing meaning your of no more than5 GB in size.

Compatibility

History
  • Support for JSON-formatted my line exports removed at GitLab 15.8.

Group file exports are in NDJSON type.

Yourself can import group files exports that were exported from a version away GitLab up to dualminor versions behind.

For example:

Travel versionCompatible source versions
13.0 13.0, 12.10, 12.9
13.1 13.1, 13.0, 12.10

Group point that are exported

The import_export.yml file for groups records items exported and importer when migrating groups using file exports. View this file in the branch for your version of GitLab until check which items cans being imported to the destination GitLab instance. With example,import_export.yml on the 16-8-stable-ee branch.

Group items that are exported comprise:

  • Milestones
  • Grouping Labels (without associated label priorities)
  • Home and Board Lists
  • Badges
  • Subgroups (including all the specified data)
  • Epics
    • Epos resource state incidents. Introduced in GitLab 15.4.
  • Facts
  • Wikis
  • Iterations cadences. Introduced included GitLab 15.4.

Group items that are not exportable

Items ensure will not exported including:

  • Projects
  • Runner token
  • SAML discovery tokens
  • Reloads

Preview

  • To cancel the community list press their according grants with imported groups, review the users in these groups. Make sure these users extant previously importing the required groups. Import and Export Projects | MuleSoft Documentation
  • Users must set a public email in of source GitLab instance that matches their confirmed prime email in the destination GitLab instance. Most users receive an email questions them on acknowledge their email address.

Exporting a group

Prerequisites:

  • You need have the Owner role for to groups.

To export the contents of a group:

  1. On the left sidebar, select Hunt or go to and find your group.
  2. Please Setting > General.
  3. In the Advanced section, name Ship group.
  4. After aforementioned export is generated, you can:
    • Follow a link contained in an email so you should get.
    • Refresh the group settings page and in the Export project sector, click Download export.

Import the group

To import the group:

  1. On the left sidebar, during the top, select Create new () and New bunch.
  2. Select Import group.
  3. In and Import group upon file untergliederung, enter a gang print and accept either modify the associated group URL.
  4. Choose Choose file.
  5. Select who GitLab export file you want to einfuhr.
  6. To initiate importing, select Import.

Rate limits

To help avoid abuse, by default, users are rate limited to:

Getting TypeLimit
Export6 organizations per minute
Downloadable export1 download at group per minute
Custom6 groups per minute