Project import and export Rake tasks

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
Linux package (Omnibus)
gitlab-rake "gitlab:import_export:import[root, group/subgroup, testingprojectimport, /path/to/file.tar.gz]"
Self-compiled (source)
bundle exec rake "gitlab:import_export:import[root, group/subgroup, testingprojectimport, /path/to/file.tar.gz]" RAILS_ENV=production

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