- Export a project
- Transfer a project to another namespace
- Archive a project
- Unarchive a project
- Restore a project
- Troubleshooting
- Related topics
Migrate projects
Export a project
You can export a project and its data.
Transfer a project to another namespace
When you transfer a project to another namespace, you move the project to a different group.
Prerequisites:
- You must have at least the Maintainer role for the group you are transferring to.
- You must be the Owner of the project you transfer.
- The group must allow creation of new projects.
- The project must not contain any container images.
- The project must not have a security policy. If a security policy is assigned to the project, it is automatically unassigned during the transfer.
-
If the root namespace changes, you must remove npm packages that follow the naming convention from the project. After you transfer the project you can either:
- Update the package scope with the new root namespace path, and publish it again to the project.
- Republish the package to the project without updating the root namespace path, which causes the package to no longer follow the naming convention. If you republish the package without updating the root namespace path, it will not be available at the instance level endpoint.
To transfer a project:
- On the left sidebar, select Search or go to and find your project.
- Select Settings > General.
- Expand Advanced.
- Under Transfer project, choose the namespace to transfer the project to.
- Select Transfer project.
- Enter the project’s name and select Confirm.
You are redirected to the project’s new page and GitLab applies a redirect. For more information about repository redirects, see What happens when a repository path changes.
Transferring a GitLab SaaS project to a different subscription tier
When you transfer a project from a namespace licensed for GitLab SaaS Premium or Ultimate to GitLab Free:
- Project access tokens are revoked.
- Pipeline subscriptions and test cases are deleted.
Archive a project
When you archive a project, the repository, packages, issues, merge requests, and all other features become read-only. Archived projects are also hidden from project lists.
To archive a project:
- On the left sidebar, select Search or go to and find your project.
- Select Settings > General.
- Expand Advanced.
- In the Archive project section, select Archive project.
- To confirm, select OK.
Unarchive a project
When you unarchive a project, the read-only restriction is removed, and the project becomes available in project lists.
Prerequisites:
- You must be an administrator or have the Owner role for the project.
- Find the archived project.
- On the left sidebar, select Search or go to.
- Select View all my projects.
- Select Explore projects.
- In the Sort projects dropdown list, select Show archived projects.
- In the Filter by name field, enter the project name.
- Select the project link.
- On the left sidebar, select Settings > General.
- Under Advanced, select Expand.
- In the Unarchive project section, select Unarchive project.
- To confirm, select OK.
Restore a project
Prerequisites:
- You must have the Owner role for the project.
- The project must be marked for deletion.
To restore a project marked for deletion:
- On the left sidebar, select Search or go to and find your project.
- Select Settings > General.
- Expand Advanced.
- In the Restore project section, select Restore project.
Troubleshooting
When working with project settings, you might encounter the following issues, or require alternate methods to complete specific tasks.
Transfer a project through console
If transferring a project through the UI or API is not working, you can attempt the transfer in a Rails console session.
p = Project.find_by_full_path('<project_path>')
# To set the owner of the project
current_user = p.creator
# Namespace where you want this to be moved
namespace = Namespace.find_by_full_path("<new_namespace>")
Projects::TransferService.new(p, current_user).execute(namespace)