[Yandex Cloud documentation](../../../index.md) > [Yandex Managed Service for GitLab](../../index.md) > [Step-by-step guides](../index.md) > Migrating from a custom GitLab installation

# Migrating from GitLab to Managed Service for GitLab

You can migrate your projects to Managed Service for GitLab using the following methods:
* [Self-migration](#self-migration): You export each project individually from the source GitLab and import them into Managed Service for GitLab without involving support. This migrates the main entities: repositories, issues with comments, merge requests, labels, milestones, wiki, and CI/CD pipelines as archives. CI/CD variables, webhooks, pipeline triggers, artifacts, and job logs are not migrated.
* [Support-assisted migration](#support-migration): Support restores the Managed Service for GitLab instance from a backup of your custom installation. This migrates all data and settings, including projects, users, [groups](https://docs.gitlab.com/user/group/), access permissions, and pipelines.

## Self-migration {#self-migration}

This method works well for migration of projects from any GitLab, including GitLab.com, a dedicated GitLab.com instance, and self-managed installations.

1. Export your project from the source GitLab instance:
    1. Open the project in the source GitLab.
    1. In the left-hand menu, select **Settings** → **General**.
    1. Expand the **Advanced** section.
    1. Click **Export project**.
    1. Wait for an email containing the export archive link or refresh the settings page and click **Download export** under **Export project**.
1. [Create a Managed Service for GitLab instance](instance-create.md).
1. By default, Managed Service for GitLab instances restrict import from external sources. To enable it:
    1. Open the GitLab admin panel.
    1. Go to **Admin Area** → **Settings** → **General**.
    1. Expand **Import and export settings**.
    1. Make sure the **GitLab export** source is enabled under **Allowed import sources**. If this source is not there, add it manually.
    1. Click **Save changes**.
1. Import a project to the Managed Service for GitLab instance:
    1. In the top-right corner, click ![image](../../../_assets/console-icons/plus.svg) **Create new...** and select **New project/repository**.
    1. Select **Import project**.
    1. Under **Import project from**, select **GitLab export**.
    1. Enter project name and URL, then select the export file you go in the previous step.
    1. Click **Import project**.
1. Migrate GitLab projects one at a time.

For more information, see these GitLab guides:
* [Import and export settings](https://docs.gitlab.com/administration/settings/import_and_export_settings/)
* [Migrate GitLab data by using file exports](https://docs.gitlab.com/user/project/settings/import_export/)

## Support-assisted migration {#support-migration}

Before you begin, see [how to run migration](../../concepts/migration.md) from a custom GitLab installation to Managed Service for GitLab.

{% note info %}

The migration feature is at the [Preview](../../../overview/concepts/launch-stages.md) stage.

{% endnote %}

To migrate data to a Managed Service for GitLab instance:
1. [Create a Managed Service for GitLab instance](instance-create.md).
1. Apply the same configuration to your Managed Service for GitLab instance as in your custom installation, such as [OmniAuth](https://docs.gitlab.com/integration/omniauth) or [group access restrictions](https://docs.gitlab.com/user/group/access_and_permissions). Entities such as users, groups, and pipelines are migrated later when using your custom installation backup.
1. Find out the GitLab version of your custom installation. For correct migration, the custom installation version must match the Managed Service for GitLab version.

   1. Open your custom GitLab installation.
   1. In the left-hand menu, click **Help**.

      A pop-up window will display the GitLab version.

1. Test the migration:

   1. [Back up](https://docs.gitlab.com/administration/backup_restore/backup_gitlab#simple-back-up-procedure) your custom installation and configuration files.
   1. [Provide the support team](https://center.yandex.cloud/support) with the backup and GitLab version of your custom installation. The support team will restore the instance from your backup in Managed Service for GitLab.
   1. Once support confirms the instance restoration in Managed Service for GitLab, [open it](instance-list.md#get) and make sure:

      * It contains all settings, data, and projects you need.
      * You can push commits and update branches.

1. Perform the production migration:

   1. Notify support of your planned migration date.
   1. On the day before the migration, [switch your custom GitLab installation](https://docs.gitlab.com/administration/read_only_gitlab) to `Read only` mode.
   1. Back up your custom installation and configuration files.
   1. Provide this backup to the support team.
   1. On the specified migration date, the support team will restore your instance from the provided backup in Managed Service for GitLab.

1. Optionally, configure the instance domain name:

   1. If you used a [custom domain name](https://docs.gitlab.com/administration/dedicated/configure_instance/network_security/#custom-domains) for your custom installation and want to keep it, provide that domain name to the support team. They will configure it for your Managed Service for GitLab instance.
   1. In your custom installation, [configure](https://docs.gitlab.com/omnibus/settings/dns/) a `CNAME` DNS record to forward users from the Managed Service for GitLab [instance domain](../../concepts/index.md#config) to your custom domain.

#### Useful links {#see-also}

* [Running migration from GitLab to Managed Service for GitLab](../../concepts/migration.md)
* [Resource relationships in Managed Service for GitLab](../../concepts/index.md)
* [Creating and activating a Yandex Managed Service for GitLab instance](instance-create.md)
* [Getting Yandex Managed Service for GitLab instance info](instance-list.md)

#### GitLab guides {#gl-docs}

* [Import and export settings](https://docs.gitlab.com/administration/settings/import_and_export_settings/)
* [Migrate GitLab data by using file exports](https://docs.gitlab.com/user/project/settings/import_export/)
* [Groups](https://docs.gitlab.com/user/group/)
* [OmniAuth](https://docs.gitlab.com/integration/omniauth)
* [Group access and permissions](https://docs.gitlab.com/user/group/access_and_permissions)
* [Back up GitLab](https://docs.gitlab.com/administration/backup_restore/backup_gitlab)
* [Place GitLab into a read-only state](https://docs.gitlab.com/administration/read_only_gitlab)
* [GitLab Dedicated network access and security](https://docs.gitlab.com/administration/dedicated/configure_instance/network_security/)
* [DNS settings](https://docs.gitlab.com/omnibus/settings/dns/)