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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

165 lines
7.5 KiB
Markdown
Raw Normal View History

2020-06-23 00:09:42 +05:30
---
stage: Manage
group: Import
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2020-06-23 00:09:42 +05:30
---
2021-11-18 22:05:49 +05:30
2022-07-23 23:45:48 +05:30
# Migrating groups using file exports (deprecated) **(FREE)**
2020-05-24 23:13:21 +05:30
2022-07-23 23:45:48 +05:30
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/2888) in GitLab 13.0 as an experimental feature. May change in future releases.
> - [Deprecated](https://gitlab.com/groups/gitlab-org/-/epics/4619) in GitLab 14.6.
2020-05-24 23:13:21 +05:30
2022-07-23 23:45:48 +05:30
WARNING:
This feature was [deprecated](https://gitlab.com/groups/gitlab-org/-/epics/4619) in GitLab 14.6 and replaced by
[a different migration method](../import/index.md). To follow progress on a solution for
[offline environments](../../application_security/offline_deployments/index.md), see
[the relevant issue](https://gitlab.com/gitlab-org/gitlab/-/issues/363406).
You can export groups, with all their related data, from one GitLab instance to another. You can also:
- [Migrate groups](../import/index.md) using the preferred method.
- [Migrate projects using file exports](../../project/settings/import_export.md).
2020-05-24 23:13:21 +05:30
2022-01-26 12:08:38 +05:30
## Enable export for a group
2020-05-24 23:13:21 +05:30
2022-01-26 12:08:38 +05:30
Prerequisite:
2020-05-24 23:13:21 +05:30
2022-04-04 11:22:00 +05:30
- You must have the Owner role for the group.
2020-05-24 23:13:21 +05:30
2022-01-26 12:08:38 +05:30
To enable import and export for a group:
2020-05-24 23:13:21 +05:30
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Admin**.
2021-11-18 22:05:49 +05:30
1. On the left sidebar, select **Settings > General**.
1. Expand **Visibility and access controls**.
1. In the **Import sources** section, select the checkboxes for the sources you want.
2020-05-24 23:13:21 +05:30
## Important Notes
Note the following:
2021-06-08 01:23:25 +05:30
- Exports are stored in a temporary directory and are deleted every 24 hours by a specific worker.
2020-05-24 23:13:21 +05:30
- To preserve group-level relationships from imported projects, run the Group Import/Export first, to allow projects to
be imported into the desired group structure.
- Imported groups are given a `private` visibility level, unless imported into a parent group.
2020-10-24 23:57:45 +05:30
- If imported into a parent group, a subgroup inherits the same level of visibility unless otherwise restricted.
2020-05-24 23:13:21 +05:30
- To preserve the member list and their respective permissions on imported groups, review the users in these groups. Make
sure these users exist before importing the desired groups.
2022-10-11 01:57:18 +05:30
- Users must set a public email in the source GitLab instance that matches one of their verified emails in the target GitLab instance.
2020-05-24 23:13:21 +05:30
2021-12-11 22:18:48 +05:30
### Exported contents
2020-05-24 23:13:21 +05:30
2022-11-25 23:54:43 +05:30
The [`import_export.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/import_export/group/import_export.yml)
file for groups lists many of the items exported and imported when migrating groups using file exports. View this file in the branch
for your version of GitLab to see the list of items relevant to you. For example,
[`import_export.yml` on the `14-10-stable-ee` branch](https://gitlab.com/gitlab-org/gitlab/-/blob/14-10-stable-ee/lib/gitlab/import_export/group/import_export.yml).
Migrating projects with file exports uses the same export and import mechanisms as creating projects from templates at the [group](../custom_project_templates.md) and
[instance](../../admin_area/custom_project_templates.md) levels. Therefore, the list of exported items is the same.
Items that are exported include:
2020-05-24 23:13:21 +05:30
- Milestones
- Labels
- Boards and Board Lists
- Badges
- Subgroups (including all the aforementioned data)
- Epics
2022-10-11 01:57:18 +05:30
- Epic resource state events ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/291983) in GitLab 15.4)
2020-05-24 23:13:21 +05:30
- Events
2021-12-11 22:18:48 +05:30
- [Wikis](../../project/wiki/group.md)
([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53247) in GitLab 13.9)
2022-11-25 23:54:43 +05:30
- Iterations cadences ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95372) in 15.4)
2020-05-24 23:13:21 +05:30
2022-11-25 23:54:43 +05:30
Items that are **not** exported include:
2020-05-24 23:13:21 +05:30
- Projects
2020-11-24 15:15:51 +05:30
- Runner tokens
2020-05-24 23:13:21 +05:30
- SAML discovery tokens
2021-02-22 17:27:13 +05:30
NOTE:
2020-05-24 23:13:21 +05:30
For more details on the specific data persisted in a group export, see the
2021-09-04 01:27:46 +05:30
[`import_export.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/import_export/group/import_export.yml) file.
2020-05-24 23:13:21 +05:30
2021-10-27 15:23:28 +05:30
## Export a group
2020-05-24 23:13:21 +05:30
2022-01-26 12:08:38 +05:30
Prerequisites:
2022-04-04 11:22:00 +05:30
- You must have the Owner role for the group.
2022-01-26 12:08:38 +05:30
To export the contents of a group:
2020-05-24 23:13:21 +05:30
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Groups** and find your group.
2021-11-18 22:05:49 +05:30
1. On the left sidebar, select **Settings > General**.
1. In the **Advanced** section, select **Export Group**.
2021-09-30 23:02:18 +05:30
1. After the export is generated, you should receive an email with a link to the [exported contents](#exported-contents)
2021-06-08 01:23:25 +05:30
in a compressed tar archive, with contents in NDJSON format.
2021-10-27 15:23:28 +05:30
1. Alternatively, you can download the export from the UI:
2020-05-24 23:13:21 +05:30
2021-10-27 15:23:28 +05:30
1. Return to your group's **Settings > General** page.
2021-11-18 22:05:49 +05:30
1. In the **Advanced** section, select **Download export**.
You can also generate a new file by selecting **Regenerate export**.
2020-05-24 23:13:21 +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).
2022-07-16 23:28:13 +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](../../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
2022-01-26 12:08:38 +05:30
You can also use the [group import/export API](../../../api/group_import_export.md).
2020-05-24 23:13:21 +05:30
### Between CE and EE
You can export groups from the [Community Edition to the Enterprise Edition](https://about.gitlab.com/install/ce-or-ee/) and vice versa.
2021-09-30 23:02:18 +05:30
The Enterprise Edition retains some group data that isn't part of the Community Edition. If you're exporting a group from the Enterprise Edition to the Community Edition, you may lose this data. For more information, see [downgrading from EE to CE](../../../index.md).
2020-05-24 23:13:21 +05:30
2022-07-23 23:45:48 +05:30
## Import the group
2022-01-26 12:08:38 +05:30
2021-11-18 22:05:49 +05:30
1. Create a new group:
- On the top bar, select **New** (**{plus}**) and then **New group**.
- On an existing group's page, select the **New subgroup** button.
1. Select **Import group**.
2020-06-23 00:09:42 +05:30
1. Enter your group name.
1. Accept or modify the associated group URL.
2021-11-18 22:05:49 +05:30
1. Select **Choose file**.
2021-10-27 15:23:28 +05:30
1. Select the file that you exported in the [Export a group](#export-a-group) section.
2021-11-18 22:05:49 +05:30
1. To begin importing, select **Import group**.
2020-06-23 00:09:42 +05:30
2021-11-18 22:05:49 +05:30
Your newly imported group page appears after the operation completes.
2020-06-23 00:09:42 +05:30
2021-12-11 22:18:48 +05:30
## Automate group and project import **(PREMIUM)**
For information on automating user, group, and project import API calls, see
[Automate group and project import](../../project/import/index.md#automate-group-and-project-import).
2020-05-24 23:13:21 +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.
### 13.0+
2020-05-24 23:13:21 +05:30
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 |
## Rate Limits
2021-02-22 17:27:13 +05:30
To help avoid abuse, by default, users are rate limited to:
2020-05-24 23:13:21 +05:30
2020-06-23 00:09:42 +05:30
| Request Type | Limit |
| ---------------- | ---------------------------------------- |
2021-02-22 17:27:13 +05:30
| Export | 6 groups per minute |
| Download export | 1 download per group per minute |
| Import | 6 groups per minute |
2021-10-27 15:23:28 +05:30
GitLab.com may have [different settings](../../gitlab_com/index.md#importexport) from the defaults.