본문으로 건너뛰기

백업

백업 생성

새로운 백업을 생성합니다. 단, 백업 생성을 위해 아래 조건을 만족해야 합니다.

  • 클러스터가 Running 상태에 있어야 함
  • Replica가 존재해야 함
  • 클러스터에 진행 중인 백업이 없어야 함
  • 노드가 2개 이상이어야 함
주의

백업 생성 중일 때는 소스 클러스터의 샤드 추가/삭제, 노드 추가/삭제/승격이 불가합니다.

Request
백업 생성 Request Syntax
curl -X POST "https://redis.kr-central-2.kakaocloud.com/v1/backups" \
-H "X-Auth-Token: {token-id}" \
-d '{Body}'
종류파라미터유형설명
Header{token-id}*StringAPI 인증 토큰 참고
BodyclusterId*String클러스터의 ID
name*String백업 이름
백업 생성 Request Body Example
{
"clusterId": "cluster-id",
"name": "backup-name"
}
Response
상태 코드설명
201리소스 생성 요청에 대한 성공 응답
400사용자의 요청이 유효하지 않아 작업을 진행할 수 없음
401인증되지 않은 사용자가 요청한 경우
403권한이 없는 사용자가 요청한 경우
404사용자가 요청한 리소스가 존재하지 않은 경우
409현재 서버의 상태에 중복된 요청이 발생한 경우
500내부 에러로 작업을 진행할 수 없는 경우
필드유형설명
objectIdString백업 ID
백업 생성 Response Example
201 Created
content-length: 52
content-type: application/json; charset=UTF-8

{
"objectId": "xxxxxxxf-7347-4d87-a49f-e705e91db2fb"
}

백업 목록 조회

백업 목록을 조회합니다. 쿼리 파라미터로 clusterName을 전달할 경우, 해당 클러스터로 만들어진 백업만 조회할 수 있습니다. 

Request
백업 목록 조회 Request Syntax
curl -X GET "https://redis.kr-central-2.kakaocloud.com/v1/backups?clusterName={cluster-name}" \
-H "X-Auth-Token: {token-id}"
종류파라미터유형설명
Header{token-id}*StringAPI 인증 토큰 참고
Query{cluster-name}String클러스터 이름
Query{cluster-id}String클러스터 ID
Response
상태 코드설명
200리소스 조회/삭제 요청에 대한 성공 응답
400사용자의 요청이 유효하지 않아 작업을 진행할 수 없음
401인증되지 않은 사용자가 요청한 경우
403권한이 없는 사용자가 요청한 경우
500내부 에러로 작업을 진행할 수 없는 경우
필드유형설명
backups[]Object Array백업 목록
backups[].idString백업 ID
backups[].nameString백업 이름
backups[].projectIdString프로젝트 ID
backups[].clusterNameString백업 소스 클러스터 이름
backups[].clusterIdString백업 소스 클러스터 ID
backups[].clusterModeEnabledBoolean백업 소스 클러스터의 클러스터 모드 활성화 여부
- true: 클러스터 모드 사용
- false: 클러스터 모드 미사용
backups[].sourceTypeString소스 유형
- scheduled: 자동 백업
- manual: 수동 백업
backups[].engineVersionString백업 소스 클러스터의 Redis 엔진 버전
backups[].flavorObject백업 소스 클러스터의 플레이버 정보
backups[].flavor.idString백업 소스 클러스터의 플레이버 ID
backups[].flavor.nameString백업 소스 클러스터의 플레이버 이름
backups[].flavor.vcpuInteger백업 소스 클러스터의 플레이버의 가상 CPU 수
backups[].flavor.memoryInteger백업 소스 클러스터의 플레이버의 메모리 크기(GiB)
backups[].shards[]Object Array클러스터의 샤드별 백업 정보
backups[].shards[].shardIdString백업이 진행된 샤드 ID, 클러스터 모드 활성화된 경우에만 확인 가능
backups[].shards[].slotsString백업할 때 샤드에 할당되어있던 Slots, 클러스터 모드 활성화된 경우에만 확인 가능
backups[].shards[].snapshotObject스냅샷 정보
backups[].shards[].snapshot.startTimestampString스냅샷 시작 시간 (RFC3339, UTC 기준)
backups[].shards[].snapshot.endTimestampString스냅샷 종료 시간 (RFC3339, UTC 기준)
backups[].shards[].snapshot.fileSizeInteger백업 파일 크기(단위: 바이트)
backups[].shards[].snapshot.memorySizeInteger백업 당시 Redis 메모리 크기(단위: 바이트)
backups[].shards[].uploadObject업로드 정보
backups[].shards[].upload.startTimestampString업로드 시작 시간 (RFC3339, UTC 기준)
backups[].shards[].upload.endTimestampString업로드 종료 시간 (RFC3339, UTC 기준)
backups[].deletionTimestampString삭제 예정 시간 (RFC3339, UTC 기준, null 가능)
- 자동백업의 경우 retentionLimit에 따른 삭제 예정 시간 조회됨
- 수동백업의 경우 null로 조회
backups[].statusString상태
backups[].createdAtString생성 날짜 (RFC3339)
backups[].retentionLimitInteger백업 보관 기간 (단위: 일), 수동 백업의 경우 0으로 표기
백업 목록 조회 Response Example
200 OK
content-length: 52
content-type: application/json; charset=UTF-8

{
"backups": [
{
"id": "asdfasdf-c6b6-40ca-8d2a-44a85166259d",
"Name": "scheduled.backup.2024-03-13-00-00.KST",
"projectId": "asdfqwerzxcv4b41a36823e2091c3a6d",
"clusterName": "test-cluster",
"clusterId": "qwerqwer-3261-457a-a826-4e789f3669bf",
"clusterModeEnabled": false,
"sourceType": "scheduled", /* 자동 백업 */
"engineVersion": "6.2.5",
"flavor": {
"id": "zxcvzxcv-qwer-4822-8a7d-9e301c86a58d",
"name": "a1-2-co",
"vcpu": 2,
"memory": 4
},
"shards": [
{
"snapshot": {
"startTimestamp": "2024-03-12T15:00:07Z",
"endTimestamp": "2024-03-12T15:00:59Z",
"fileSize": 1097408574,
"memorySize": 2276701464
},
"upload": {
"startTimestamp": "2024-03-12T15:01:12Z",
"endTimestamp": "2024-03-12T15:01:45Z"
}
}
],
"deletionTimestamp": "2024-03-13T15:00:01.259773Z",
"status": "Available",
"createdAt": "2024-03-12T15:00:01.260312Z",
"retentionLimit": 1
},
{
"id": "12341234-1234-4438-9ec0-b6fbf8c4656d",
"name": "manual-backup",
"projectId": "zxcvbnmlkjhg4b41a36823e2091c3a6d",
"clusterName": "test-cluster",
"clusterId": "qwerqwer-qwer-4d77-b365-2832013d2d79",
"clusterModeEnabled": true,
"sourceType": "manual", /* 수동 백업 */
"engineVersion": "6.2.5",
"flavor": {
"id": "12341234-1234-1234-b3c7-042f796a8fc5",
"name": "a1-8-std",
"vcpu": 8,
"memory": 32
},
"shards": [
{
"shardId": "001",
"slots": "0-8191",
"snapshot": {
"startTimestamp": "2024-03-12T12:09:30Z",
"endTimestamp": "2024-03-12T12:13:13Z",
"fileSize": 2802172768,
"memorySize": 21975228040
},
"upload": {
"startTimestamp": "2024-03-12T12:13:30Z",
"endTimestamp": "2024-03-12T12:14:55Z"
}
}, {
"shardId": "002",
"slots": "8192-16383",
"snapshot": {
"startTimestamp": "2024-03-12T12:09:30Z",
"endTimestamp": "2024-03-12T12:13:13Z",
"fileSize": 2802172768,
"memorySize": 21975228040
},
"upload": {
"startTimestamp": "2024-03-12T12:13:30Z",
"endTimestamp": "2024-03-12T12:14:55Z"
}
}
],
"deletionTimestamp": null,
"status": "Available",
"createdAt": "2024-03-12T12:09:28.251656Z",
"retentionLimit": 0
}
]
}

백업 상세 정보 조회

특정 백업의 상세 정보를 조회합니다. 

Request
백업 상세 정보 조회 Request Syntax
curl -X GET "https://redis.kr-central-2.kakaocloud.com/v1/backups/{backup-name}" \
-H "X-Auth-Token: {token-id}"
종류파라미터유형설명
URL{backup-name}*String백업 이름
Header{token-id}*StringAPI 인증 토큰 참고
Response
상태 코드설명
200리소스 조회/삭제 요청에 대한 성공 응답
400사용자의 요청이 유효하지 않아 작업을 진행할 수 없음
401인증되지 않은 사용자가 요청한 경우
403권한이 없는 사용자가 요청한 경우
404사용자가 요청한 리소스가 존재하지 않은 경우
500내부 에러로 작업을 진행할 수 없는 경우
필드유형설명
idString백업 ID
nameString백업 이름
projectIdString프로젝트 ID
clusterNameString백업 소스 클러스터 이름
clusterIdString백업 소스 클러스터 ID
clusterModeEnabledBoolean백업 소스 클러스터의 클러스터 모드 활성화 여부
- true: 클러스터 모드 사용
- false: 클러스터 모드 사용 안 함
sourceTypeString소스 유형
- scheduled: 자동 백업
- manual: 수동 백업
engineVersionString백업 소스 클러스터의 Redis 엔진 버전
flavorObject백업 소스 클러스터의 플레이버 정보
flavor.idString백업 소스 클러스터의 플레이버 ID
flavor.nameString백업 소스 클러스터의 플레이버 이름
flavor.vcpuInteger백업 소스 클러스터의 플레이버의 가상 CPU 수
flavor.memoryInteger백업 소스 클러스터의 플레이버의 메모리 크기(GiB)
shards[]Object Array클러스터의 샤드별 백업 정보
shards[].shardIdString백업이 진행된 샤드 ID, 클러스터 모드 활성화된 경우에만 확인 가능
shards[].slotsString백업할 때 샤드에 할당되어있던 Slots, 클러스터 모드 활성화된 경우에만 확인 가능
shards[].snapshotObject스냅샷 정보
shards[].snapshot.startTimestampString스냅샷 시작 시간 (RFC3339, UTC 기준)
shards[].snapshot.endTimestampString스냅샷 종료 시간 (RFC3339, UTC 기준)
shards[].snapshot.fileSizeInteger백업 파일 크기(단위: 바이트)
shards[].snapshot.memorySizeInteger백업 당시 Redis 메모리 크기(단위: 바이트)
shards[].uploadObject업로드 정보
shards[].upload.startTimestampString업로드 시작 시간 (RFC3339, UTC 기준)
shards[].upload.endTimestampString업로드 종료 시간 (RFC3339, UTC 기준)
deletionTimestampString삭제 예정 시간 (RFC3339, UTC 기준, null 가능)
statusString상태
createdAtString생성 날짜 (RFC3339)
retentionLimitInteger백업 보관 기간 (단위: 일), 수동 백업의 경우 0으로 표기
백업 상세 정보 조회 Response Example
200 Created
content-length: 52
content-type: application/json; charset=UTF-8

{
"id": "12341234-1234-4438-9ec0-b6fbf8c4656d",
"name": "manual-backup",
"projectId": "zxcvbnmlkjhg4b41a36823e2091c3a6d",
"clusterName": "test-cluster",
"clusterId": "qwerqwer-qwer-4d77-b365-2832013d2d79",
"clusterModeEnabled": false,
"sourceType": "manual", /* 수동 백업 */
"engineVersion": "6.2.5",
"flavor": {
"id": "12341234-1234-1234-b3c7-042f796a8fc5",
"name": "a1-8-std",
"vcpu": 8,
"memory": 32
},
"shards": [
{
"snapshot": {
"startTimestamp": "2024-03-12T12:09:30Z",
"endTimestamp": "2024-03-12T12:13:13Z",
"fileSize": 2802172768,
"memorySize": 21975228040
},
"upload": {
"startTimestamp": "2024-03-12T12:13:30Z",
"endTimestamp": "2024-03-12T12:14:55Z"
}
}
],
"deletionTimestamp": null,
"status": "Available",
"createdAt": "2024-03-12T12:09:28.251656Z"
}

백업 삭제

특정 백업을 삭제합니다. 

Request
백업 삭제 Request Syntax
curl -X DELETE "https://redis.kr-central-2.kakaocloud.com/v1/backups/{backup-name}" \
-H "X-Auth-Token: {token-id}"
종류파라미터유형설명
URL{backup-name}*String백업 이름
Header{token-id}*StringAPI 인증 토큰 참고
Response
상태 코드설명
200리소스 조회/삭제 요청에 대한 성공 응답
400사용자의 요청이 유효하지 않아 작업을 진행할 수 없음
401인증되지 않은 사용자가 요청한 경우
403권한이 없는 사용자가 요청한 경우
404사용자가 요청한 리소스가 존재하지 않은 경우
500내부 에러로 작업을 진행할 수 없는 경우
필드유형설명
objectIdString백업 ID
백업 삭제 Response Example
200 OK
content-length: 52
content-type: application/json; charset=UTF-8

{
"objectId": "qwerqwer-7347-4d87-a49f-e705e91db2fb"
}

백업 복제

특정 백업과 동일한 백업을 복제합니다. 

  • 백업이 완료되었고, Available 상태인 경우에만 가능합니다. 
Request
백업 복제 Request Syntax
curl -X POST "https://redis.kr-central-2.kakaocloud.com/v1/backups/{backup-name}/copy" \
-H "X-Auth-Token: {token-id}" \
-d '{Body}'
종류파라미터유형설명
URL{backup-name}*String복제 대상의 백업 이름
Header{token-id}*StringAPI 인증 토큰 참고
Bodyname*String복제된 백업 이름
- 글자수: 4 ~ 63자
- 영어 소문자/숫자/- 제외 모든 값 입력 불가
- - 연속 입력 불가
- 영어로 시작해야 함
- 영어/숫자로 끝나야 함
- 공백 입력 불가
백업 복제 Request Body Example
{
"name": "copy-backup-name"
}
Response
상태 코드설명
201리소스 생성 요청에 대한 성공 응답
400사용자의 요청이 유효하지 않아 작업을 진행할 수 없음
401인증되지 않은 사용자가 요청한 경우
404사용자가 요청한 리소스가 존재하지 않은 경우
409현재 서버의 상태에 중복된 요청이 발생한 경우
500내부 에러로 작업을 진행할 수 없는 경우
필드유형설명
objectIdString복제된 백업의 ID
백업 복제 Response Example
201 OK
content-type: application/json; charset=UTF-8

{
"objectId": "qwerqwer-25a6-403f-981f-2cdd107fe3f9"
}

백업을 Object Storage로 업로드

특정 백업을 Object Storage로 업로드합니다. 

  • 동일 리전, 프로젝트 내에 권한이 있는 버킷으로만 업로드할 수 있습니다
  • 백업이 완료되었고, Available 상태인 경우에만 업로드가 가능합니다.
  • 클러스터 모드를 사용하는 경우, 내보낼 백업 이름에 샤드번호를 추가해 샤드 수만큼 입력한 오브젝트 스토리지 전체 경로에 백업 파일이 생성됩니다.
주의

백업을 Object Storage로 업로드하는 도중 API 인증 토큰이 만료될 경우, 업로드에 실패할 수 있습니다.

Request
백업을 Object Storage로 업로드 Request Syntax
curl -X POST "https://redis.kr-central-2.kakaocloud.com/v1/backups/{backup-name}/export" \
-H "X-Auth-Token: {token-id}" \
-d '{Body}'
종류파라미터유형설명
URL{backup-name}*String복제할 백업 이름
Header{token-id}*StringAPI 인증 토큰 참고
Bodydestination*String백업을 업로드할 Object Storage 경로
ex. "bucket/folder/.../"
name*String백업을 업로드할 때 파일 이름
- 버킷 이름을 제외한 경로 포함 396 bytes(198자) 이내
- 하이픈(-), 언더바(_), 점(.) 제외 특수문자 입력 불가
백업을 Object Storage로 업로드 Request Body Example
{
"destination": "bucket/folder/file",
"name": "file-name"
}
Response
상태 코드설명
200리소스 조회/삭제 요청에 대한 성공 응답
400사용자의 요청이 유효하지 않아 작업을 진행할 수 없음
401인증되지 않은 사용자가 요청한 경우
403권한이 없는 사용자가 요청한 경우
404사용자가 요청한 리소스가 존재하지 않은 경우
409현재 서버의 상태에 중복된 요청이 발생한 경우
500내부 에러로 작업을 진행할 수 없는 경우
필드유형설명
objectIdString백업 추출 ID
백업을 Object Storage로 업로드 Response Example
201 OK
content-type: application/json; charset=UTF-8

{
"objectId": "qwerqwer-25a6-403f-981f-2cdd107fe3f9"
}