Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 2.11 KB

project_import_export.md

File metadata and controls

65 lines (44 loc) · 2.11 KB
stage group info
Systems
Distribution
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: Self-managed

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

:::TabTitle Linux package (Omnibus)

gitlab-rake "gitlab:import_export:import[root, group/subgroup, testingprojectimport, /path/to/file.tar.gz]"

:::TabTitle Self-compiled (source)

bundle exec rake "gitlab:import_export:import[root, group/subgroup, testingprojectimport, /path/to/file.tar.gz]" RAILS_ENV=production

::EndTabs

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]"