Import and export settings

Tier: Free, Premium, Ultimate Offering: Self-managed

Settings for import- and export-related features.

Configure allowed import sources

Before you can import projects from other systems, you must enable the import source for that system.

  1. Sign in to GitLab as a user with Administrator access level.
  2. On the left sidebar, at the bottom, select Admin.
  3. Select Settings > General.
  4. Expand the Import and export settings section.
  5. Select each of Import sources to allow.
  6. Select Save changes.

Enable project export

To enable the export of projects and their data:

  1. Sign in to GitLab as a user with Administrator access level.
  2. On the left sidebar, at the bottom, select Admin.
  3. Select Settings > General.
  4. Expand the Import and export settings section.
  5. Scroll to Project export.
  6. Select the Enabled checkbox.
  7. Select Save changes.

Enable migration of groups and projects by direct transfer

Status: Beta
History
caution
In GitLab 16.1 and earlier, you should not use direct transfer with scheduled scan execution policies. If using direct transfer, first upgrade to GitLab 16.2 and ensure security policy bots are enabled in the projects you are enforcing.
caution
This feature is in beta and subject to change without notice. This feature is not ready for production use.

Migration of groups and projects by direct transfer is disabled by default. To enable migration of groups and projects by direct transfer:

  1. Sign in to GitLab as a user with Administrator access level.
  2. On the left sidebar, at the bottom, select Admin.
  3. Select Settings > General.
  4. Expand the Import and export settings section.
  5. Scroll to Allow migrating GitLab groups and projects by direct transfer.
  6. Select the Enabled checkbox.
  7. Select Save changes.

The same setting is available in the API as the bulk_import_enabled attribute.

Enable silent admin exports

History

Enable silent admin exports to prevent audit events when instance administrators trigger a project or group file export or download the export file. Exports from non-administrators still generate audit events.

To enable silent admin project and group file exports:

  1. On the left sidebar, at the bottom, select Admin.
  2. Select Settings > General, then expand Import and export settings.
  3. Scroll to Silent exports by admins.
  4. Select the Enabled checkbox.

Allow contribution mapping to administrators

History
  • Introduced in GitLab 17.5 with flag named importer_user_mapping. Disabled by default.

Allow mapping of imported user contributions to administrators.

To allow mapping of imported user contributions to administrators:

  1. On the left sidebar, at the bottom, select Admin.
  2. Select Settings > General, then expand Import and export settings.
  3. Scroll to Allow contribution mapping to administrators.
  4. Select the Enabled checkbox.

Max export size

History

To modify the maximum file size for exports in GitLab:

  1. On the left sidebar, at the bottom, select Admin.
  2. Select Settings > General, then expand Import and export settings.
  3. Increase or decrease by changing the value in Maximum export size (MiB).

Max import size

To modify the maximum file size for imports in GitLab:

  1. On the left sidebar, at the bottom, select Admin.
  2. Select Settings > General.
  3. Expand Import and export settings.
  4. Increase or decrease by changing the value in Maximum import size (MiB).

This setting applies only to repositories imported from a GitLab export file.

If you choose a size larger than the configured value for the web server, you may receive errors. See the troubleshooting section for more details.

For GitLab.com repository size limits, read accounts and limit settings.

Maximum remote file size for imports

History

By default, the maximum remote file size for imports from external object storages (for example, AWS) is 10 GiB.

To modify this setting:

  1. On the left sidebar, at the bottom, select Admin.
  2. Select Settings > General.
  3. Expand Import and export settings.
  4. Increase or decrease by changing the value in Maximum import remote file size (MiB). Set to 0 to set no file size limit.

Maximum download file size for imports by direct transfer

History

By default, the maximum download file size for imports by direct transfer is 5 GiB.

To modify this setting:

  1. On the left sidebar, at the bottom, select Admin.
  2. Select Settings > General.
  3. Expand Import and export settings.
  4. Increase or decrease by changing the value in Direct transfer maximum download file size (MiB). Set to 0 to set no download file size limit.

Maximum decompressed file size for imported archives

History
  • Introduced in GitLab 16.3.
  • Maximum decompressed file size for archives from imports field renamed from Maximum decompressed size in GitLab 16.4.

When you import a project using file exports or direct transfer, you can specify the maximum decompressed file size for imported archives. The default value is 25 GiB.

When you import a compressed file, the decompressed size cannot exceed the maximum decompressed file size limit. If the decompressed size exceeds the configured limit, the following error is returned:

Decompressed archive size validation failed.

To modify this setting:

  1. On the left sidebar, at the bottom, select Admin.
  2. Select Settings > General.
  3. Expand Import and export settings.
  4. Set another value for Maximum decompressed file size for archives from imports (MiB).

Timeout for decompressing archived files

History

When you import a project, you can specify the maximum time out for decompressing imported archives. The default value is 210 seconds.

To modify the maximum decompressed file size for imports in GitLab:

  1. On the left sidebar, at the bottom, select Admin.
  2. Select Settings > General.
  3. Expand Import and export settings.
  4. Set another value for Timeout for decompressing archived files (seconds).

Maximum number of simultaneous import jobs

History

You can specify the maximum number of import jobs that are executed simultaneously for:

The job limit is not applied when importing merge requests because there is a hard-coded limit for merge requests to avoid overloading servers.

The default job limit is:

  • For the GitHub importer, 1000.
  • For the Bitbucket Cloud and Bitbucket Server importer, 100. The Bitbucket importers have a low default limit because we haven’t yet determined a good default limit. Administrators of self-managed GitLab instances should experiment with a higher limit.

To modify this setting:

  1. On the left sidebar, at the bottom, select Admin.
  2. Select Settings > General.
  3. Expand Import and export settings.
  4. Set another value for Maximum number of simultaneous import jobs for the desired importer.

Maximum number of simultaneous batch export jobs

History

Direct transfer exports can consume a significant amount of resources. To prevent using up the database or Sidekiq processes, administrators can configure the concurrent_relation_batch_export_limit setting.

The default value is 8 jobs, which corresponds to a reference architecture for up to 40 RPS or 2,000 users. If you encounter PG::QueryCanceled: ERROR: canceling statement due to statement timeout errors or jobs getting interrupted due to Sidekiq memory limits, you might want to reduce this number. If you have enough resources, you can increase this number to process more concurrent export jobs.

To modify this setting, send an API request to /api/v4/application/settings with concurrent_relation_batch_export_limit. For more information, see application settings API.

Troubleshooting

Error: Help page documentation base url is blocked: execution expired

While enabling application settings like import source, you might get a Help page documentation base url is blocked: execution expired error. To work around this error:

  1. Add docs.gitlab.com, or the redirect help documentation pages URL, to the allowlist.
  2. Select Save Changes.