- 모든 그룹 저장소 이동 조회
- 특정 그룹의 모든 저장소 이동 조회
- 단일 그룹 저장소 이동 가져오기
- 그룹의 단일 저장소 이동 가져오기
- 그룹의 저장소 이동 예약하기
- 모든 그룹의 저장소 이동을 위해 저장소 이동 일정을 설정합니다
그룹 저장소 이동 API
그룹 위키 저장소는 서로 다른 스토리지 간에 이동할 수 있습니다. 이 API는 예를 들어,
Gitaly 클러스터로 마이그레이션하기
또는 그룹 위키 마이그레이션하기에 도움이 될 수 있습니다. 이 API는
그룹의 프로젝트 저장소를 관리하지 않습니다. 프로젝트 이동을 예약하려면
프로젝트 저장소 이동 API를 사용하세요.
그룹 저장소 이동이 처리되는 동안 다양한 상태로 전환됩니다. state
의 값은 다음과 같습니다:
-
initial
: 레코드가 생성되었지만 백그라운드 작업이 아직 예약되지 않았습니다. -
scheduled
: 백그라운드 작업이 예약되었습니다. -
started
: 그룹 저장소가 대상 스토리지로 복사되고 있습니다. -
replicated
: 그룹이 이동되었습니다. -
failed
: 그룹 저장소 복사에 실패했거나 체크섬이 일치하지 않았습니다. -
finished
: 그룹이 이동되었고, 소스 스토리지의 저장소가 삭제되었습니다. -
cleanup failed
: 그룹이 이동되었으나 소스 스토리지의 저장소를 삭제할 수 없었습니다.
데이터 무결성을 보장하기 위해 이동 기간 동안 그룹은 임시 읽기 전용 상태로 설정됩니다.
이 기간 동안 사용자가 새로운 커밋을 푸시하려고 하면 다음 메시지가 표시됩니다:
저장소가 임시로 읽기 전용입니다. 나중에 다시 시도하십시오.
이 API를 사용하려면 관리자로 인증해야 합니다.
다른 유형의 저장소를 이동하기 위한 API도 사용할 수 있습니다:
모든 그룹 저장소 이동 조회
GET /group_repository_storage_moves
기본적으로 GET
요청은 한 번에 20개의 결과를 반환합니다. API 결과는 페이지네이션됩니다.
예시 요청:
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/group_repository_storage_moves"
예시 응답:
[
{
"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 /groups/:group_id/repository_storage_moves
기본적으로 GET
요청은 한 번에 20개의 결과를 반환합니다. API 결과는 페이지네이션됩니다.
지원되는 속성:
속성 | 유형 | 필수 | 설명 |
---|---|---|---|
group_id |
integer | yes | 그룹의 ID. |
예시 요청:
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/repository_storage_moves"
예시 응답:
[
{
"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 /group_repository_storage_moves/:repository_storage_id
지원되는 속성:
속성 | 유형 | 필수 | 설명 |
---|---|---|---|
repository_storage_id |
정수 | 예 | 그룹 저장소 이동의 ID. |
예제 요청:
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/group_repository_storage_moves/1"
예제 응답:
{
"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 /groups/:group_id/repository_storage_moves/:repository_storage_id
지원되는 속성:
속성 | 유형 | 필수 | 설명 |
---|---|---|---|
group_id |
정수 | 예 | 그룹의 ID. |
repository_storage_id |
정수 | 예 | 그룹 저장소 이동의 ID. |
예제 요청:
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/1/repository_storage_moves/1"
예제 응답:
{
"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"
}
}
그룹의 저장소 이동 예약하기
그룹의 저장소 이동을 예약합니다. 이 엔드포인트:
- 오직 그룹 위키 저장소만 이동합니다.
- 그룹의 프로젝트에 대한 저장소는 이동하지 않습니다. 프로젝트 이동을 예약하려면 Project repository storage moves API를 사용하세요.
POST /groups/:group_id/repository_storage_moves
지원되는 속성:
속성 | 유형 | 필수 | 설명 |
---|---|---|---|
group_id |
정수 | 예 | 그룹의 ID. |
destination_storage_name |
문자열 | 아니오 | 목적지 저장소 샤드의 이름. 제공되지 않으면 저장소는 저장소 가중치 기반으로 선택됩니다. |
예제 요청:
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"
예제 응답:
{
"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"
}
}
모든 그룹의 저장소 이동을 위해 저장소 이동 일정을 설정합니다
소스 저장소 샤드에 저장된 각 그룹 저장소의 이동 일정을 설정합니다.
이 엔드포인트는 모든 그룹을 한 번에 마이그레이션합니다. 자세한 내용은
모든 그룹 이동을 참조하세요.
POST /group_repository_storage_moves
지원되는 속성:
속성 | 유형 | 필수 | 설명 |
---|---|---|---|
source_storage_name |
string | 예 | 소스 저장소 샤드의 이름입니다. |
destination_storage_name |
string | 아니요 | 대상 저장소 샤드의 이름입니다. 제공되지 않으면 저장소는 저장소 가중치에 따라 선택됩니다. |
예시 요청:
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"
예시 응답:
{
"message": "202 Accepted"
}