Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/project/settings/import_export.md')
-rw-r--r--doc/user/project/settings/import_export.md42
1 files changed, 41 insertions, 1 deletions
diff --git a/doc/user/project/settings/import_export.md b/doc/user/project/settings/import_export.md
index 69215e03f28..6c3bf731cf8 100644
--- a/doc/user/project/settings/import_export.md
+++ b/doc/user/project/settings/import_export.md
@@ -141,6 +141,11 @@ The following items are **not** exported:
- Merge Request Approvers
- Repository size limits
+These content rules also apply to creating projects from templates on the
+[group](../../group/custom_project_templates.md)
+or [instance](../../admin_area/custom_project_templates.md)
+levels, because the same export and import mechanisms are used.
+
NOTE:
For more details on the specific data persisted in a project export, see the
[`import_export.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/import_export/project/import_export.yml) file.
@@ -221,6 +226,15 @@ GitLab.com may have [different settings](../../gitlab_com/index.md#importexport)
## Troubleshooting
+### Project fails to import due to mismatch
+
+If the [shared runners enablement](../../../ci/runners/runners_scope.md#enable-shared-runners)
+does not match between the exported project, and the project import, the project fails to import.
+Review [issue 276930](https://gitlab.com/gitlab-org/gitlab/-/issues/276930), and either:
+
+- Ensure shared runners are enabled in both the source and destination projects.
+- Disable shared runners on the parent group when you import the project.
+
### Import workaround for large repositories
[Maximum import size limitations](#import-the-project)
@@ -258,7 +272,7 @@ reduce the repository size for another import attempt.
git gc --prune=now --aggressive
# Prepare recreating an importable file
- git bundle create ../project.bundle smaller-tmp-main
+ git bundle create ../project.bundle <default-branch-name>
cd ..
mv project/ ../"$EXPORT"-project
cd ..
@@ -276,3 +290,29 @@ reduce the repository size for another import attempt.
its [default branch](../repository/branches/default.md), and
delete the temporary, `smaller-tmp-main` branch, and
the local, temporary data.
+
+### Manually execute export steps
+
+Exports sometimes fail without giving enough information to troubleshoot. In these cases, it can be
+helpful to [execute the export process manually within rails](https://gitlab.com/gitlab-com/runbooks/-/blob/master/docs/uncategorized/project-export.md#export-a-project-via-rails-console).
+Execute each line individually, rather than pasting the entire block at once, so you can see any
+errors each command returns.
+
+```shell
+u = User.find_by_username('someuser')
+p = Project.find_by_full_path('some/project')
+e = Projects::ImportExport::ExportService.new(p,u)
+
+e.send(:version_saver).send(:save)
+e.send(:avatar_saver).send(:save)
+e.send(:project_tree_saver).send(:save)
+e.send(:uploads_saver).send(:save)
+e.send(:wiki_repo_saver).send(:save)
+e.send(:lfs_saver).send(:save)
+e.send(:snippets_repo_saver).send(:save)
+e.send(:design_repo_saver).send(:save)
+
+s = Gitlab::ImportExport::Saver.new(exportable: p, shared:p.import_export_shared)
+s.send(:compress_and_save)
+s.send(:save_upload)
+```