Commit d8a891cf authored by Marcia Ramos's avatar Marcia Ramos

Merge branch...

Merge branch 'docs/300538-fj-add-docs-for-new-endpoints-group-repository-storage-move' into 'master'

Add documentation for group repository storage moves

See merge request gitlab-org/gitlab!53043
parents 2d42057d 46fe717e
......@@ -1416,10 +1416,10 @@ sudo /opt/gitlab/embedded/bin/praefect -config /var/opt/gitlab/praefect/config.t
If your GitLab instance already has repositories on single Gitaly nodes, these aren't migrated to
Gitaly Cluster automatically.
Project repositories may be moved from one storage location using the [Project repository storage moves API](../../api/project_repository_storage_moves.md):
Project repositories may be moved from one storage location using the [Project repository storage moves API](../../api/project_repository_storage_moves.md). Note that this API cannot move all repository types. For moving other repositories types, see:
NOTE:
The Project repository storage moves API [cannot move all repository types](../../api/project_repository_storage_moves.md#limitations).
- [Snippet repository storage moves API](../../api/snippet_repository_storage_moves.md).
- [Group repository storage moves API](../../api/group_repository_storage_moves.md).
To move repositories to Gitaly Cluster:
......@@ -1440,7 +1440,9 @@ To move repositories to Gitaly Cluster:
using the API to confirm that all projects have moved. No projects should be returned
with `repository_storage` field set to the old storage.
In a similar way, you can move Snippet repositories using the [Snippet repository storage moves API](../../api/snippet_repository_storage_moves.md):
In a similar way, you can move other repository types by using the
[Snippet repository storage moves API](../../api/snippet_repository_storage_moves.md) **(FREE SELF)**
or the [Groups repository storage moves API](../../api/group_repository_storage_moves.md) **(PREMIUM SELF)**.
## Debugging Praefect
......
......@@ -26,12 +26,10 @@ For more information, see:
querying and scheduling project repository moves.
- [The API documentation](../../api/snippet_repository_storage_moves.md) details the endpoints for
querying and scheduling snippet repository moves.
- [The API documentation](../../api/group_repository_storage_moves.md) details the endpoints for
querying and scheduling group repository moves **(PREMIUM SELF)**.
- [Migrate existing repositories to Gitaly Cluster](../gitaly/praefect.md#migrate-existing-repositories-to-gitaly-cluster).
### Limitations
Read more in the [API documentation for projects](../../api/project_repository_storage_moves.md#limitations) and the [API documentation for snippets](../../api/snippet_repository_storage_moves.md#limitations).
## Migrating to another GitLab instance
[Using the API](#moving-data-within-a-gitlab-instance) isn't an option if you are migrating to a new
......
......@@ -141,6 +141,7 @@ The following API resources are available outside of project and group contexts
| [Feature flags](features.md) | `/features` |
| [Geo Nodes](geo_nodes.md) **(PREMIUM SELF)** | `/geo_nodes` |
| [Group Activity Analytics](group_activity_analytics.md) **(STARTER)** | `/analytics/group_activity/{issues_count | merge_requests_count | new_members_count }` |
| [Group repository storage moves](group_repository_storage_moves.md) **(PREMIUM SELF)** | `/group_repository_storage_moves` |
| [Import repository from GitHub](import.md) | `/import/github` |
| [Instance clusters](instance_clusters.md) | `/admin/clusters` |
| [Issues](issues.md) | `/issues` (also available for groups and projects) |
......
---
stage: Create
group: Editor
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
type: reference
---
# Group repository storage moves API **(PREMIUM SELF)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53016) in GitLab 13.9.
Group 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, or to migrate a Group Wiki.
As group repository storage moves are processed, they transition through different states. Values
of `state` are:
- `initial`
- `scheduled`
- `started`
- `finished`
- `failed`
- `replicated`
- `cleanup failed`
To ensure data integrity, groups 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.
For other type of repositories you can read:
- [Project repository storage moves API](project_repository_storage_moves.md)
- [Snippet repository storage moves API](snippet_repository_storage_moves.md)
## Retrieve all group repository storage moves
```plaintext
GET /group_repository_storage_moves
```
By default, `GET` requests return 20 results at a time because the API results
are [paginated](README.md#pagination).
Example request:
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/group_repository_storage_moves"
```
Example response:
```json
[
{
"id": 1,
"created_at": "2020-05-07T04:27:17.234Z",
"state": "scheduled",
"source_storage_name": "default",
"destination_storage_name": "storage2",
"group": {
"id": 283,
"web_url": "https://gitlab.example.com/groups/testgroup",
"name": "testgroup"
}
}
]
```
## Retrieve all repository storage moves for a single group
In order to retrieve all the repository storage moves for a single group you can use the following endpoint:
```plaintext
GET /groups/:group_id/repository_storage_moves
```
By default, `GET` requests return 20 results at a time because the API results
are [paginated](README.md#pagination).
Supported attributes:
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `group_id` | integer | yes | ID of the group. |
Example request:
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/repository_storage_moves"
```
Example response:
```json
[
{
"id": 1,
"created_at": "2020-05-07T04:27:17.234Z",
"state": "scheduled",
"source_storage_name": "default",
"destination_storage_name": "storage2",
"group": {
"id": 283,
"web_url": "https://gitlab.example.com/groups/testgroup",
"name": "testgroup"
}
}
]
```
## Get a single group repository storage move
In order to retrieve a single repository storage move throughout all the existing repository storage moves, you can use the following endpoint:
```plaintext
GET /group_repository_storage_moves/:repository_storage_id
```
Supported attributes:
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `repository_storage_id` | integer | yes | ID of the group repository storage move. |
Example request:
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/group_repository_storage_moves/1"
```
Example response:
```json
{
"id": 1,
"created_at": "2020-05-07T04:27:17.234Z",
"state": "scheduled",
"source_storage_name": "default",
"destination_storage_name": "storage2",
"group": {
"id": 283,
"web_url": "https://gitlab.example.com/groups/testgroup",
"name": "testgroup"
}
}
```
## Get a single repository storage move for a group
Given a group, you can retrieve a specific repository storage move for that group, through the following endpoint:
```plaintext
GET /groups/:group_id/repository_storage_moves/:repository_storage_id
```
Supported attributes:
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `group_id` | integer | yes | ID of the group. |
| `repository_storage_id` | integer | yes | ID of the group repository storage move. |
Example request:
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/repository_storage_moves/1"
```
Example response:
```json
{
"id": 1,
"created_at": "2020-05-07T04:27:17.234Z",
"state": "scheduled",
"source_storage_name": "default",
"destination_storage_name": "storage2",
"group": {
"id": 283,
"web_url": "https://gitlab.example.com/groups/testgroup",
"name": "testgroup"
}
}
```
## Schedule a repository storage move for a group
```plaintext
POST /groups/:group_id/repository_storage_moves
```
Supported attributes:
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `group_id` | integer | yes | ID of the group. |
| `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" \
--data '{"destination_storage_name":"storage2"}' "https://gitlab.example.com/api/v4/groups/1/repository_storage_moves"
```
Example response:
```json
{
"id": 1,
"created_at": "2020-05-07T04:27:17.234Z",
"state": "scheduled",
"source_storage_name": "default",
"destination_storage_name": "storage2",
"group": {
"id": 283,
"web_url": "https://gitlab.example.com/groups/testgroup",
"name": "testgroup"
}
}
```
## Schedule repository storage moves for all groups on a storage shard
Schedules repository storage moves for each group repository stored on the source storage shard.
```plaintext
POST /group_repository_storage_moves
```
Supported attributes:
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `source_storage_name` | string | yes | Name of the source storage shard. |
| `destination_storage_name` | string | no | Name of the destination storage shard. 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" \
--data '{"source_storage_name":"default"}' "https://gitlab.example.com/api/v4/group_repository_storage_moves"
```
Example response:
```json
{
"message": "202 Accepted"
}
```
......@@ -30,11 +30,10 @@ 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.
Snippet repositories can be moved using the [Snippet repository storage moves API](snippet_repository_storage_moves.md).
For other repository types see:
## Limitations
- Group-level wikis [can't be moved with the API](https://gitlab.com/gitlab-org/gitlab/-/issues/219003).
- [Snippet repository storage moves API](snippet_repository_storage_moves.md).
- [Group repository storage moves API](group_repository_storage_moves.md).
## Retrieve all project repository storage moves
......
......@@ -30,11 +30,10 @@ 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.
Project repositories can be moved using the [Project repository storage moves API](project_repository_storage_moves.md).
For other repository types see:
## Limitations
- Group-level wikis [can't be moved with the API](https://gitlab.com/gitlab-org/gitlab/-/issues/219003).
- [Project repository storage moves API](project_repository_storage_moves.md).
- [Group repository storage moves API](group_repository_storage_moves.md).
## Retrieve all snippet repository storage moves
......
......@@ -459,6 +459,8 @@ Group wikis work the same way as [project wikis](../project/wiki/index.md), plea
Group wikis can be edited by members with [Developer permissions](../../user/permissions.md#group-members-permissions)
and above.
Group wiki repositories can be moved through the [Group repository storage moves API](../../api/group_repository_storage_moves.md).
### Group wikis limitations
There are a few limitations compared to project wikis:
......@@ -466,13 +468,10 @@ There are a few limitations compared to project wikis:
- Git LFS is not supported.
- Group wikis are not included in global search, group exports, and Geo replication.
- Changes to group wikis don't show up in the group's activity feed.
- Group wikis [can't be moved](../../api/project_repository_storage_moves.md#limitations) using the project
repository moves API.
For updates, you can follow:
- [The epic tracking feature parity with project wikis](https://gitlab.com/groups/gitlab-org/-/epics/2782).
- [The issue for adding the ability to move group wikis using the API](https://gitlab.com/gitlab-org/gitlab/-/issues/219003).
## Group Security Dashboard **(ULTIMATE)**
......
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