{{< details >}}
- Tier: 基础版,专业版,旗舰版
- Offering: 私有化部署
{{< /details >}}
极狐GitLab 提供了用于 项目导入和导出 的 Rake 任务。
您只能从 兼容的 极狐GitLab 实例导入。
导入大型项目
Rake 任务 用于导入大型极狐GitLab 项目导出。
作为此任务的一部分,我们还禁用了直接上传。这避免了将巨大的归档文件上传到 GCS,这可能导致空闲事务超时。
我们可以从终端运行此任务:
参数:
属性 | 类型 | 必需 | 描述 |
---|---|---|---|
username |
string | yes | 用户名 |
namespace_path |
string | yes | 命名空间路径 |
project_path |
string | yes | 项目路径 |
archive_path |
string | yes | 您要导入的导出项目 tarball 的路径 |
{{< 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 >}}
导出大型项目
您可以使用 Rake 任务导出大型项目。
参数:
属性 | 类型 | 必需 | 描述 |
---|---|---|---|
username |
string | yes | 用户名 |
namespace_path |
string | yes | 命名空间路径 |
project_path |
string | yes | 项目名称 |
archive_path |
string | yes | 存储导出项目 tarball 的文件路径 |
gitlab-rake "gitlab:import_export:export[username, namespace_path, project_path, archive_path]"