2020-10-24 23:57:45 +05:30
---
2021-01-29 00:20:46 +05:30
stage: Manage
group: Import
2021-02-22 17:27:13 +05:30
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments"
2020-10-24 23:57:45 +05:30
type: reference, howto
---
2016-08-24 12:49:21 +05:30
# Project import/export
2020-06-23 00:09:42 +05:30
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/3050) in GitLab 8.9.
2020-03-13 15:44:24 +05:30
> - From GitLab 10.0, administrators can disable the project export option on the GitLab instance.
Existing projects running on any GitLab instance or GitLab.com can be exported with all their related
data and be moved into a new GitLab instance.
The **GitLab import/export** button is displayed if the project import option is enabled.
See also:
- [Project import/export API ](../../../api/project_import_export.md )
2021-03-11 19:13:27 +05:30
- [Project import/export administration Rake tasks ](../../../administration/raketasks/project_import_export.md ) ** (FREE SELF)**
2020-05-24 23:13:21 +05:30
- [Group import/export ](../../group/settings/import_export.md )
2020-04-08 14:13:33 +05:30
- [Group import/export API ](../../../api/group_import_export.md )
2020-03-13 15:44:24 +05:30
To set up a project import/export:
2020-10-24 23:57:45 +05:30
1. Navigate to **Admin Area > Settings > Visibility and access controls** .
2020-03-13 15:44:24 +05:30
1. Scroll to **Import sources**
1. Enable desired **Import sources**
## Important notes
Note the following:
2021-01-29 00:20:46 +05:30
- Before you can import a project, you need to export the data first.
See [Exporting a project and its data ](#exporting-a-project-and-its-data )
for how you can export a project through the UI.
2020-05-24 23:13:21 +05:30
- Imports from a newer version of GitLab are not supported.
The Importing GitLab version must be greater than or equal to the Exporting GitLab version.
2021-06-08 01:23:25 +05:30
- Imports fail unless the import and export GitLab instances are
2020-03-13 15:44:24 +05:30
compatible as described in the [Version history ](#version-history ).
2021-06-08 01:23:25 +05:30
- Exports are generated in your configured `shared_path` , a temporary shared directory,
2021-04-29 21:17:54 +05:30
and are moved to your configured `uploads_directory` . Every 24 hours, a specific worker deletes these export files.
2020-03-13 15:44:24 +05:30
- Group members are exported as project members, as long as the user has
2021-02-22 17:27:13 +05:30
maintainer or administrator access to the group where the exported project lives.
2021-06-08 01:23:25 +05:30
- Project members with owner access are imported as maintainers.
2021-01-29 00:20:46 +05:30
- Imported users can be mapped by their primary email on self-managed instances, if an administrative user (not an owner) does the import.
2020-03-13 15:44:24 +05:30
Otherwise, a supplementary comment is left to mention that the original author and
2021-06-08 01:23:25 +05:30
the MRs, notes, or issues are owned by the importer.
- For project migration imports performed over GitLab.com Groups, preserving author information is
possible through a [professional services engagement ](https://about.gitlab.com/services/migration/ ).
2020-03-13 15:44:24 +05:30
- If an imported project contains merge requests originating from forks,
2021-06-08 01:23:25 +05:30
then new branches associated with such merge requests are created
2020-03-13 15:44:24 +05:30
within a project during the import/export. Thus, the number of branches
in the exported project could be bigger than in the original project.
2021-02-22 17:27:13 +05:30
- Deploy keys allowed to push to protected branches are not exported. Therefore,
2021-06-08 01:23:25 +05:30
you need to recreate this association by first enabling these deploy keys in your
2021-02-22 17:27:13 +05:30
imported project and then updating your protected branches accordingly.
2016-08-24 12:49:21 +05:30
2016-09-29 09:46:39 +05:30
## Version history
2021-06-08 01:23:25 +05:30
### 14.0+
In GitLab 14.0, the JSON format is no longer supported for project and group exports. To allow for a
transitional period, you can still import any JSON exports. The new format for imports and exports
is NDJSON.
2020-07-28 23:09:34 +05:30
### 13.0+
2020-05-24 23:13:21 +05:30
Starting with GitLab 13.0, GitLab can import bundles that were exported from a different GitLab deployment.
This ability is limited to two previous GitLab [minor ](../../../policy/maintenance.md#versioning )
releases, which is similar to our process for [Security Releases ](../../../policy/maintenance.md#security-releases ).
For example:
| Current version | Can import bundles exported from |
|-----------------|----------------------------------|
| 13.0 | 13.0, 12.10, 12.9 |
| 13.1 | 13.1, 13.0, 12.10 |
### 12.x
Prior to 13.0 this was a defined compatibility table:
2020-03-13 15:44:24 +05:30
2020-04-08 14:13:33 +05:30
| Exporting GitLab version | Importing GitLab version |
| -------------------------- | -------------------------- |
2020-07-28 23:09:34 +05:30
| 11.7 to 12.10 | 11.7 to 12.10 |
2020-04-08 14:13:33 +05:30
| 11.1 to 11.6 | 11.1 to 11.6 |
| 10.8 to 11.0 | 10.8 to 11.0 |
| 10.4 to 10.7 | 10.4 to 10.7 |
| 10.3 | 10.3 |
| 10.0 to 10.2 | 10.0 to 10.2 |
| 9.4 to 9.6 | 9.4 to 9.6 |
| 9.2 to 9.3 | 9.2 to 9.3 |
| 8.17 to 9.1 | 8.17 to 9.1 |
| 8.13 to 8.16 | 8.13 to 8.16 |
| 8.12 | 8.12 |
| 8.10.3 to 8.11 | 8.10.3 to 8.11 |
| 8.10.0 to 8.10.2 | 8.10.0 to 8.10.2 |
| 8.9.5 to 8.9.11 | 8.9.5 to 8.9.11 |
| 8.9.0 to 8.9.4 | 8.9.0 to 8.9.4 |
2017-08-17 22:00:37 +05:30
2020-03-13 15:44:24 +05:30
Projects can be exported and imported only between versions of GitLab with matching Import/Export versions.
For example, 8.10.3 and 8.11 have the same Import/Export version (0.1.3)
2021-06-08 01:23:25 +05:30
and the exports between them are compatible.
2016-09-29 09:46:39 +05:30
2020-05-24 23:13:21 +05:30
## Between CE and EE
You can export projects from the [Community Edition to the Enterprise Edition ](https://about.gitlab.com/install/ce-or-ee/ ) and vice versa.
This assumes [version history ](#version-history ) requirements are met.
If you're exporting a project from the Enterprise Edition to the Community Edition, you may lose data that is retained only in the Enterprise Edition. For more information, see [downgrading from EE to CE ](../../../README.md ).
2016-08-24 12:49:21 +05:30
## Exported contents
2021-06-08 01:23:25 +05:30
The following items are exported:
2016-08-24 12:49:21 +05:30
- Project and wiki repositories
- Project uploads
2020-07-28 23:09:34 +05:30
- Project configuration, excluding integrations
2020-04-22 19:07:51 +05:30
- Issues with comments, merge requests with diffs and comments, labels, milestones, snippets, time tracking,
2016-08-24 12:49:21 +05:30
and other project entities
2020-04-22 19:07:51 +05:30
- Design Management files and data
2018-05-09 12:01:36 +05:30
- LFS objects
2019-10-12 21:52:04 +05:30
- Issue boards
2020-04-08 14:13:33 +05:30
- Pipelines history
2021-02-22 17:27:13 +05:30
- Push Rules
2021-04-17 20:07:23 +05:30
- Awards
2016-08-24 12:49:21 +05:30
2021-06-08 01:23:25 +05:30
The following items are **not** exported:
2016-08-24 12:49:21 +05:30
- Build traces and artifacts
2017-08-17 22:00:37 +05:30
- Container registry images
2021-04-17 20:07:23 +05:30
- CI/CD variables
2019-02-15 15:39:39 +05:30
- Webhooks
2017-08-17 22:00:37 +05:30
- Any encrypted tokens
2019-09-30 21:07:59 +05:30
- Merge Request Approvers
2021-02-22 17:27:13 +05:30
NOTE:
2019-09-30 21:07:59 +05:30
For more details on the specific data persisted in a project export, see the
2020-04-08 14:13:33 +05:30
[`import_export.yml` ](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/import_export/project/import_export.yml ) file.
2016-08-24 12:49:21 +05:30
## Exporting a project and its data
2021-01-29 00:20:46 +05:30
Full project export functionality is limited to project maintainers and owners.
You can configure such functionality through [project settings ](index.md ):
To export a project and its data, follow these steps:
2019-09-04 21:01:54 +05:30
1. Go to your project's homepage.
2016-08-24 12:49:21 +05:30
2020-10-24 23:57:45 +05:30
1. Click **Settings** in the sidebar.
2016-08-24 12:49:21 +05:30
1. Scroll down to find the **Export project** button:
2019-09-30 21:07:59 +05:30
![Export button ](img/import_export_export_button.png )
2016-08-24 12:49:21 +05:30
1. Once the export is generated, you should receive an e-mail with a link to
download the file:
2019-09-30 21:07:59 +05:30
![Email download link ](img/import_export_mail_link.png )
2016-08-24 12:49:21 +05:30
1. Alternatively, you can come back to the project settings and download the
2020-03-13 15:44:24 +05:30
file from there, or generate a new export. Once the file is available, the page
2016-08-24 12:49:21 +05:30
should show the **Download export** button:
2019-09-30 21:07:59 +05:30
![Download export ](img/import_export_download_export.png )
2016-08-24 12:49:21 +05:30
## Importing the project
2019-09-30 21:07:59 +05:30
1. The GitLab project import feature is the first import option when creating a
2019-09-04 21:01:54 +05:30
new project. Click on **GitLab export** :
2016-08-24 12:49:21 +05:30
2019-09-30 21:07:59 +05:30
![New project ](img/import_export_new_project.png )
2016-08-24 12:49:21 +05:30
2019-09-04 21:01:54 +05:30
1. Enter your project name and URL. Then select the file you exported previously:
2016-08-24 12:49:21 +05:30
2019-09-30 21:07:59 +05:30
![Select file ](img/import_export_select_file.png )
2016-08-24 12:49:21 +05:30
1. Click on **Import project** to begin importing. Your newly imported project
2021-06-08 01:23:25 +05:30
page appears shortly.
2019-10-12 21:52:04 +05:30
2021-02-22 17:27:13 +05:30
NOTE:
2019-10-12 21:52:04 +05:30
If use of the `Internal` visibility level
[is restricted ](../../../public_access/public_access.md#restricting-the-use-of-public-or-internal-projects ),
all imported projects are given the visibility of `Private` .
2020-03-13 15:44:24 +05:30
2021-02-22 17:27:13 +05:30
NOTE:
2021-03-08 18:12:59 +05:30
The maximum import file size can be set by the Administrator, default is `0` (unlimited).
2021-03-11 19:13:27 +05:30
As an administrator, you can modify the maximum import file size. To do so, use the `max_import_size` option in the [Application settings API ](../../../api/settings.md#change-application-settings ) or the [Admin Area UI ](../../admin_area/settings/account_and_limit_settings.md ). Default [modified ](https://gitlab.com/gitlab-org/gitlab/-/issues/251106 ) from 50MB to 0 in GitLab 13.8.
2020-06-23 00:09:42 +05:30
2020-07-28 23:09:34 +05:30
### Project import status
You can query an import through the [Project import/export API ](../../../api/project_import_export.md#import-status ).
As described in the API documentation, the query may return an import error or exceptions.
2021-03-11 19:13:27 +05:30
### Import large projects **(FREE SELF)**
2020-07-28 23:09:34 +05:30
If you have a larger project, consider using a Rake task, as described in our [developer documentation ](../../../development/import_project.md#importing-via-a-rake-task ).
2021-02-22 17:27:13 +05:30
## Rate Limits
To help avoid abuse, by default, users are rate limited to:
2020-03-13 15:44:24 +05:30
2021-02-22 17:27:13 +05:30
| Request Type | Limit |
| ---------------- | ---------------------------------------- |
| Export | 6 projects per minute |
| Download export | 1 download per group per minute |
| Import | 6 projects per minute |
2020-03-13 15:44:24 +05:30
2021-02-22 17:27:13 +05:30
Please note that GitLab.com may have [different settings ](../../gitlab_com/index.md#importexport ) from the defaults.