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

42 lines
1.6 KiB
Markdown
Raw Normal View History

2019-09-30 21:07:59 +05:30
# Project import/export administration **(CORE ONLY)**
2016-08-24 12:49:21 +05:30
2020-06-23 00:09:42 +05:30
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/3050) in GitLab 8.9.
2020-03-13 15:44:24 +05:30
> - From GitLab 11.3, import/export can use object storage automatically.
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-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
```
2020-03-13 15:44:24 +05:30
The current list of DB tables that will be exported 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).
- The project import option must be enabled in
application settings (`/admin/application_settings/general`) under **Import sources**, which is available
under **{admin}** **Admin Area >** **{settings}** **Settings > Visibility and access controls**.
- The exports are stored in a temporary [shared directory](../../development/shared_files.md)
and are deleted every 24 hours by a specific worker.