debian-mirror-gitlab/doc/administration/raketasks/project_import_export.md

60 lines
2.2 KiB
Markdown
Raw Normal View History

2021-01-29 00:20:46 +05:30
---
2021-02-22 17:27:13 +05:30
stage: Enablement
group: Distribution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2021-01-29 00:20:46 +05:30
---
2021-03-11 19:13:27 +05:30
# Project import/export administration **(FREE SELF)**
2016-08-24 12:49:21 +05:30
2020-05-24 23:13:21 +05:30
GitLab provides Rake tasks relating to project import and export. For more information, see:
2020-03-13 15:44:24 +05:30
- [Project import/export documentation](../../user/project/settings/import_export.md).
- [Project import/export API](../../api/project_import_export.md).
2020-07-28 23:09:34 +05:30
- [Developer documentation: project import/export](../../development/import_export.md)
## Project import status
You can query an import through the [Project import/export API](../../api/project_import_export.md#import-status).
As described in the API documentation, the query may return an import error or exceptions.
## Import large projects
If you have a larger project, consider using a Rake task, as described in our [developer documentation](../../development/import_project.md#importing-via-a-rake-task).
2020-03-13 15:44:24 +05:30
2020-05-24 23:13:21 +05:30
## Import/export tasks
2020-03-13 15:44:24 +05:30
The GitLab import/export version can be checked by using the following command:
```shell
2016-08-24 12:49:21 +05:30
# Omnibus installations
sudo gitlab-rake gitlab:import_export:version
# Installations from source
bundle exec rake gitlab:import_export:version RAILS_ENV=production
```
2021-02-22 17:27:13 +05:30
The current list of DB tables to export can be listed by using the following command:
2016-08-24 12:49:21 +05:30
2020-03-13 15:44:24 +05:30
```shell
2016-08-24 12:49:21 +05:30
# Omnibus installations
sudo gitlab-rake gitlab:import_export:data
# Installations from source
bundle exec rake gitlab:import_export:data RAILS_ENV=production
```
2020-03-13 15:44:24 +05:30
Note the following:
- Importing is only possible if the version of the import and export GitLab instances are
compatible as described in the [Version history](../../user/project/settings/import_export.md#version-history).
2021-09-04 01:27:46 +05:30
- The project import option must be enabled:
2021-11-11 11:23:49 +05:30
1. On the top bar, select **Menu > Admin**.
2021-09-04 01:27:46 +05:30
1. On the left sidebar, select **Settings > General**.
1. Expand **Visibility and access controls**.
1. Under **Import sources**, check the "Project export enabled" option.
1. Select **Save changes**.
2021-06-08 01:23:25 +05:30
- The exports are stored in a temporary directory and are deleted every
24 hours by a specific worker.