debian-mirror-gitlab/doc/user/project/settings/import_export.md

143 lines
5.3 KiB
Markdown
Raw Normal View History

2016-08-24 12:49:21 +05:30
# Project import/export
2019-12-04 20:38:33 +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)
- [Project import/export administration rake tasks](../../../administration/raketasks/project_import_export.md) **(CORE ONLY)**
To set up a project import/export:
1. Navigate to **{admin}** **Admin Area >** **{settings}** **Settings > Visibility and access controls**.
1. Scroll to **Import sources**
1. Enable desired **Import sources**
## Important notes
Note the following:
- Imports will fail unless the import and export GitLab instances are
compatible as described in the [Version history](#version-history).
- Exports are stored in a temporary [shared directory](../../../development/shared_files.md)
and are deleted every 24 hours by a specific worker.
- Group members are exported as project members, as long as the user has
maintainer or admin access to the group where the exported project lives. Import admins should map users by email address.
Otherwise, a supplementary comment is left to mention that the original author and
the MRs, notes, or issues will be owned by the importer.
- Project members with owner access will be imported as maintainers.
- If an imported project contains merge requests originating from forks,
then new branches associated with such merge requests will be created
within a project during the import/export. Thus, the number of branches
in the exported project could be bigger than in the original project.
2016-08-24 12:49:21 +05:30
2016-09-29 09:46:39 +05:30
## Version history
2020-03-13 15:44:24 +05:30
The following table lists updates to Import/Export:
| GitLab version | Import/Export schema version |
2018-03-17 18:26:18 +05:30
| ---------------- | --------------------- |
2018-11-08 19:23:39 +05:30
| 11.1 to current | 0.2.4 |
| 10.8 | 0.2.3 |
2018-10-15 14:42:47 +05:30
| 10.4 | 0.2.2 |
2018-03-17 18:26:18 +05:30
| 10.3 | 0.2.1 |
| 10.0 | 0.2.0 |
| 9.4.0 | 0.1.8 |
| 9.2.0 | 0.1.7 |
| 8.17.0 | 0.1.6 |
| 8.13.0 | 0.1.5 |
| 8.12.0 | 0.1.4 |
| 8.10.3 | 0.1.3 |
| 8.10.0 | 0.1.2 |
| 8.9.5 | 0.1.1 |
| 8.9.0 | 0.1.0 |
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)
and the exports between them will be compatible.
2016-09-29 09:46:39 +05:30
2016-08-24 12:49:21 +05:30
## Exported contents
The following items will be exported:
- Project and wiki repositories
- Project uploads
2019-02-15 15:39:39 +05:30
- Project configuration, including services
2016-08-24 12:49:21 +05:30
- Issues with comments, merge requests with diffs and comments, labels, milestones, snippets,
and other project entities
2019-12-21 20:55:43 +05:30
- Design Management files and data **(PREMIUM)**
2018-05-09 12:01:36 +05:30
- LFS objects
2019-10-12 21:52:04 +05:30
- Issue boards
2016-08-24 12:49:21 +05:30
The following items will NOT be exported:
- Build traces and artifacts
2017-08-17 22:00:37 +05:30
- Container registry images
- CI 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
- Push Rules
- Awards
NOTE: **Note:**
For more details on the specific data persisted in a project export, see the
2019-12-04 20:38:33 +05:30
[`import_export.yml`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/import_export/import_export.yml) file.
2016-08-24 12:49:21 +05:30
## Exporting a project and its data
2019-09-04 21:01:54 +05:30
1. Go to your project's homepage.
2016-08-24 12:49:21 +05:30
2020-03-13 15:44:24 +05:30
1. Click **{settings}** **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
page will appear soon.
2019-10-12 21:52:04 +05:30
NOTE: **Note:**
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
## Rate limits
To help avoid abuse, users are rate limited to:
| Request Type | Limit |
| ---------------- | --------------------------- |
| Export | 1 project per 5 minutes |
| Download export | 10 projects per 10 minutes |
| Import | 30 projects per 10 minutes |