2.2 KiB
		
	
	
	
	
	
			
		
		
	
	
			2.2 KiB
		
	
	
	
	
	
| stage | group | info | title | 
|---|---|---|---|
| GitLab Delivery | Self Managed | To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments | Project import and export Rake tasks | 
{{< details >}}
- Tier: Free, Premium, Ultimate
- Offering: GitLab Self-Managed
{{< /details >}}
GitLab provides Rake tasks for project import and export.
You can only import from a compatible GitLab instance.
Import large projects
The Rake task is used for importing large GitLab project exports.
As part of this task, we also disable direct upload. This avoids uploading a huge archive to GCS, which can cause idle transaction timeouts.
We can run this task from the terminal:
Parameters:
| Attribute | Type | Required | Description | 
|---|---|---|---|
| username | string | yes | User name | 
| namespace_path | string | yes | Namespace path | 
| project_path | string | yes | Project path | 
| archive_path | string | yes | Path to the exported project tarball you want to import | 
{{< tabs >}}
{{< tab title="Linux package (Omnibus)" >}}
gitlab-rake "gitlab:import_export:import[root, group/subgroup, testingprojectimport, /path/to/file.tar.gz]"
{{< /tab >}}
{{< tab title="Self-compiled (source)" >}}
bundle exec rake "gitlab:import_export:import[root, group/subgroup, testingprojectimport, /path/to/file.tar.gz]" RAILS_ENV=production
{{< /tab >}}
{{< /tabs >}}
Export large projects
You can use a Rake task to export large project.
Parameters:
| Attribute | Type | Required | Description | 
|---|---|---|---|
| username | string | yes | User name | 
| namespace_path | string | yes | Namespace path | 
| project_path | string | yes | Project name | 
| archive_path | string | yes | Path to file to store the export project tarball | 
gitlab-rake "gitlab:import_export:export[username, namespace_path, project_path, archive_path]"