diff options
Diffstat (limited to 'doc/api/project_repository_storage_moves.md')
-rw-r--r-- | doc/api/project_repository_storage_moves.md | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/doc/api/project_repository_storage_moves.md b/doc/api/project_repository_storage_moves.md index b490b6235b1..c1ba421e73e 100644 --- a/doc/api/project_repository_storage_moves.md +++ b/doc/api/project_repository_storage_moves.md @@ -9,7 +9,7 @@ type: reference > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31285) in GitLab 13.0. -Project repositories can be moved between storages. This can be useful when +Project repositories including wiki and design repositories can be moved between storages. This can be useful when [migrating to Gitaly Cluster](../administration/gitaly/praefect.md#migrate-existing-repositories-to-gitaly-cluster), for example. @@ -22,10 +22,19 @@ of `state` are: - `finished` - `failed` - `replicated` -- `cleanup_failed` +- `cleanup failed` + +To ensure data integrity, projects are put in a temporary read-only state for the +duration of the move. During this time, users receive a `The repository is temporarily +read-only. Please try again later.` message if they try to push new commits. This API requires you to [authenticate yourself](README.md#authentication) as an administrator. +## Limitations + +- The repositories associated with snippets [can't be moved with the API](https://gitlab.com/groups/gitlab-org/-/epics/3393). +- Group-level wikis [can't be moved with the API](https://gitlab.com/gitlab-org/gitlab/-/issues/219003). + ## Retrieve all project repository storage moves ```plaintext @@ -185,6 +194,14 @@ Example response: ## Schedule a repository storage move for a project +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34119) in GitLab 13.1. +> - [Introduced](https://gitlab.com/gitlab-org/gitaly/-/issues/2618) in GitLab 13.3, original repository is automatically removed after successful move and integrity check. + +CAUTION: **Caution:** +Before GitLab 13.3, a repository move worked more like a repository copy as the +original repository was not deleted from the original storage disk location and +had to be manually cleaned up. + ```plaintext POST /projects/:project_id/repository_storage_moves ``` @@ -194,12 +211,12 @@ Parameters: | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `project_id` | integer | yes | ID of the project | -| `destination_storage_name` | string | no | Name of the destination storage shard. If not provided the storage will be selected automatically. | +| `destination_storage_name` | string | no | Name of the destination storage shard. In [GitLab 13.5 and later](https://gitlab.com/gitlab-org/gitaly/-/issues/3209), the storage is selected automatically if not provided | Example request: ```shell -curl --request POST --header "PRIVATE_TOKEN: <your_access_token>" --header "Content-Type: application/json" \ +curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --header "Content-Type: application/json" \ --data '{"destination_storage_name":"storage2"}' "https://gitlab.example.com/api/v4/projects/1/repository_storage_moves" ``` |