diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-03 21:08:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-03 21:08:58 +0300 |
commit | 782f2505315c3c66e524f3365827fce341527eb1 (patch) | |
tree | 34a54eec9dcd24f82f3ea8dbdee86e54df54ca0c /doc/development/import_project.md | |
parent | e5d314d4323793f00df65f781cfaacce742a6f10 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/import_project.md')
-rw-r--r-- | doc/development/import_project.md | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/doc/development/import_project.md b/doc/development/import_project.md index f222a6533e8..1c5beffea1a 100644 --- a/doc/development/import_project.md +++ b/doc/development/import_project.md @@ -47,7 +47,9 @@ This method will take longer to import than the other methods and will depend on ### Importing via a Rake task -[`import.rake`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/tasks/gitlab/import_export/import.rake) was introduced for importing large GitLab project exports. +> The [Rake task](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/tasks/gitlab/import_export/import.rake) was [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/20724) in GitLab 12.6, replacing a GitLab.com Ruby script. + +This script was introduced in GitLab 12.6 for importing large GitLab project exports. As part of this script we also disable direct and background upload to avoid situations where a huge archive is being uploaded to GCS (while being inside a transaction, which can cause idle transaction timeouts). @@ -63,9 +65,53 @@ Parameters: | `archive_path` | string | yes | Path to the exported project tarball you want to import | ```shell -bundle exec rake "gitlab:import_export:import[root, root, testingprojectimport, /path/to/file.tar.gz]" +bundle exec rake "gitlab:import_export:import[root, group/subgroup, testingprojectimport, /path/to/file.tar.gz]" +``` + +If you're running Omnibus, run the following Rake task: + +```shell +gitlab-rake "gitlab:import_export:import[root, group/subgroup, testingprojectimport, /path/to/file.tar.gz]" +``` + +#### Troubleshooting + +Check the common errors listed below, what they mean, and how to fix them. + +##### `Exception: undefined method 'name' for nil:NilClass` + +The `username` is not valid. + +##### `Exception: undefined method 'full_path' for nil:NilClass` + +The `namespace_path` does not exist. +For example, one of the groups or subgroups is mistyped or missing +or you've specified the project name in the path. + +The task will only create the project. +If you want to import it to a new group or subgroup then create it first. + +##### `Exception: No such file or directory @ rb_sysopen - (filename)` + +The specified project export file in `archive_path` is missing. + +##### `Name can contain only letters, digits, emojis ...` + +```plaintext +Name can contain only letters, digits, emojis, '_', '.', dash, space. It must start with letter, +digit, emoji or '_'. and Path can contain only letters, digits, '_', '-' and '.'. Cannot start +with '-', end in '.git' or end in '.atom' ``` +The project name specified in `project_path` is not valid for one of the specified reasons. + +Only put the project name in `project_path`. If, for example, you put a path of subgroups in there +it will fail with this error as `/` is not a valid character in a project name. + +##### `Name has already been taken and Path has already been taken` + +A project with that name already exists. + ### Importing via the Rails console The last option is to import a project using a Rails console: |