VPC 환경에서 이용 가능합니다.
Ncloud 표준 표현을 적용한 API입니다.
클러스터 백업 또는 Imported Backup을 복원하여 새 클러스터를 생성합니다. 복원은 비동기로 처리되며, 새 클러스터의 엔진 버전은 복원할 백업의 값을 따릅니다. 특정 시점으로의 복원(PITR)은 제공하지 않습니다.
요청
요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.
| 메서드 | URI |
|---|---|
| POST | /mysql/v1/clusters/restore |
요청 헤더
Cloud DB Serverless API에서 공통으로 사용하는 헤더에 대한 정보는 Cloud DB Serverless 요청 헤더를 참조해 주십시오.
요청 바디
요청 바디에 대한 설명은 다음과 같습니다.
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
name |
String | Required | 생성할 클러스터 이름
|
source |
Object | Required | 복원 소스 |
source.type |
String | Required | 복원 소스 종류
|
source.originalClusterName |
String | Conditional | 원본 클러스터 이름
|
source.backupName |
String | Required | 복원할 백업 이름
|
source.adminUserName |
String | Conditional | 새 클러스터의 관리 계정 이름
|
source.adminPassword |
String | Conditional | 새 클러스터의 관리 계정 비밀번호
|
source.storageType |
String | Optional | 데이터 스토리지 타입
|
network |
Object | Required | 네트워크 설정 |
network.vpcNo |
Integer | Required | VPC 번호
|
network.subnetNo |
Integer | Required | 서브넷 번호 |
network.port |
Integer | Required | DB 접속 포트 |
multiZone |
Boolean | Required | 멀티 존 구성 여부
|
unit |
Object | Required | 컴퓨팅 Unit 범위
|
unit.min |
Number | Required | 최소 값
|
unit.max |
Number | Required | 최대 값
|
backupConfig |
Object | Required | 자동 백업 설정 |
backupConfig.backupAuto |
Boolean | Optional | 자동 백업 시각 지정 방식
|
backupConfig.backupTime |
String | Conditional | 자동 백업 시각
|
backupConfig.retentionDays |
Integer | Required | 백업 보관 기간 (일)
|
autoScale |
Object | Optional | 오토 스케일링 설정 |
autoScale.scaleOut |
Object | Optional | 수평 확장(스케일 인/아웃) 설정 |
autoScale.scaleOut.enabled |
Boolean | Optional | 수평 확장 활성화 여부
|
autoScale.scaleOut.thresholdConnection |
Integer | Conditional | 연결 수 임계값
|
autoScale.scaleOut.thresholdCpu |
Integer | Conditional | CPU 사용률 임계값 (%)
|
autoScale.scaleOut.replica |
Object | Conditional | Replica 인스턴스 수 범위
|
autoScale.scaleOut.replica.min |
Integer | Conditional | 최소 값
|
autoScale.scaleOut.replica.max |
Integer | Conditional | 최대 값
|
autoScale.scaleUp |
Object | Optional | 수직 확장(스케일 업/다운) 설정 |
autoScale.scaleUp.enabled |
Boolean | Optional | 수직 확장 활성화 여부
|
highAvailability |
Boolean | Required | 고가용성(자동 장애 조치) 사용 여부
|
요청 예시
요청 예시는 다음과 같습니다.
curl --location --request POST 'https://clouddb-serverless.apigw.ntruss.com/mysql/v1/clusters/restore' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json' \
--data '{
"name": "test-cluster-02",
"source": {
"type": "BACKUP",
"originalClusterName": "test-cluster-01",
"backupName": "test-cluster-01-20261013112000"
},
"network": {
"vpcNo": 12345,
"subnetNo": 67890,
"port": 3306
},
"multiZone": false,
"unit": {
"min": 1,
"max": 3
},
"backupConfig": {
"backupAuto": true,
"retentionDays": 3
},
"autoScale": {
"scaleUp": {
"enabled": true
}
},
"highAvailability": true
}'
응답
응답 형식을 설명합니다.
응답 헤더
응답 헤더에 대한 설명은 다음과 같습니다.
| 필드 | 필수 여부 | 설명 |
|---|---|---|
retry-after |
- | 권장 폴링 간격 (초)
|
응답 바디
응답 바디에 대한 설명은 다음과 같습니다.
| 필드 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
id |
String | - | Operation 식별자
|
done |
Boolean | - | 완료 여부
|
metadata |
Object | - | Operation 부가 정보 |
metadata.operationType |
String | - | 작업 유형
|
metadata.resourceType |
String | - | 대상 리소스
|
metadata.startDateTime |
String | - | 작업 시작 일시
|
metadata.endDateTime |
String | - | 작업 완료 일시
|
metadata.progress |
Integer | - | 진행률 (%)
|
results |
Object | - | 성공 결과
|
results.name |
String | - | 작업 대상 클러스터 이름 |
error |
Object | - | 실패 사유
|
응답 상태 코드
응답 상태 코드에 대한 설명은 다음과 같습니다.
| HTTP 상태 코드 | 코드 | 메시지 | 설명 |
|---|---|---|---|
| 400 | InvalidParameter |
The specified parameter is invalid. |
파라미터 값이 허용 범위나 형식을 벗어난 경우 |
| 400 | InvalidState |
Indicates that the specified state is not a valid state for an event source. |
복원 소스 백업이 사용 가능한 상태가 아닌 경우 |
| 409 | Conflict |
The request could not be processed because of a conflict in the current status of the resource. |
같은 이름의 클러스터가 이미 존재하는 경우 |
| 409 | ResourceInUse |
The specified resource is in use. |
복원 소스 백업이 다른 작업에 사용 중인 경우 |
참고
Cloud DB Serverless API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 Cloud DB Serverless 응답 상태 코드를 참조해 주십시오.
응답 예시
응답 예시는 다음과 같습니다.
{
"id": "92bd3ca1-7685-4bd8-a07d-48a224e7fd27",
"done": false,
"metadata": {
"operationType": "CREATE",
"resourceType": "clusters",
"startDateTime": "2026-10-13T11:25:00.296128721Z",
"endDateTime": null
},
"results": null
}