Commit d424fb9e authored by Nick Gaskill's avatar Nick Gaskill

Merge branch 'calebcooper-manually-export-troubleshoot' into 'master'

Manually execute export steps for troubleshooting

See merge request gitlab-org/gitlab!70728
parents 57f17c9a 31083964
......@@ -279,3 +279,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)
```
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment