Backup
Create backup
Create a new backup. To create a backup, the following conditions must be met:
- The cluster must be in
Running
state - At least one replica must exist
- No ongoing backup operations in the cluster
- The cluster must contain at least two nodes
caution
While a backup is being created, you cannot add/remove shards, or add/remove/promote nodes in the source cluster.
Request
Request syntax for creating a backup
curl -X POST "https://redis.kr-central-2.kakaocloud.com/v1/backups" \
-H "X-Auth-Token: {token-id}" \
-d '{Body}'
Type | Parameter | Type | Description |
---|---|---|---|
Header | {token-id} * | String | Refer to API Authentication Token |
Body | clusterId* | String | ID of the cluster |
name* | String | Name of the backup |
Request body example for creating a backup
{
"clusterId": "cluster-id",
"name": "backup-name"
}
Response
Status Code | Description |
---|---|
201 | Resource created successfully |
400 | Invalid user request |
401 | Unauthorized request |
403 | Forbidden request |
404 | Resource not found |
409 | Conflict with current server state |
500 | Internal server error |
Field | Type | Description |
---|---|---|
objectId | String | ID of the created backup |
Response example for creating a backup
201 Created
content-length: 52
content-type: application/json; charset=UTF-8
{
"objectId": "xxxxxxxf-7347-4d87-a49f-e705e91db2fb"
}
Retrieve backup list
Retrieve a list of backups. You can filter the list by clusterName
query parameter to get only the backups associated with a specific cluster.
Request
Request syntax for retrieving backup list
curl -X GET "https://redis.kr-central-2.kakaocloud.com/v1/backups?clusterName={cluster-name}" \
-H "X-Auth-Token: {token-id}"
Type | Parameter | Type | Description |
---|---|---|---|
Header | {token-id} * | String | Refer to API Authentication Token |
Query | {cluster-name} | String | Name of the cluster |
Query | {cluster-id} | String | ID of the cluster |
Response
Status Code | Description |
---|---|
200 | Request successful |
400 | Invalid user request |
401 | Unauthorized request |
403 | Forbidden request |
500 | Internal server error |
Field | Type | Description |
---|---|---|
backups[] | Object Array | List of backups |
backups[].id | String | Backup ID |
backups[].name | String | Backup name |
backups[].projectId | String | Project ID |
backups[].clusterName | String | Name of the source cluster for the backup |
backups[].clusterId | String | ID of the source cluster for the backup |
backups[].clusterModeEnabled | Boolean | Whether cluster mode is enabled for the source cluster - true : Cluster mode enabled- false : Cluster mode disabled |
backups[].sourceType | String | Source type - scheduled : Automated backup- manual : Manual backup |
backups[].engineVersion | String | Redis engine version of the source cluster |
backups[].flavor | Object | Flavor information of the source cluster |
backups[].flavor.id | String | Flavor ID of the source cluster |
backups[].flavor.name | String | Flavor name of the source cluster |
backups[].flavor.vcpu | Integer | Number of virtual CPUs in the flavor of the source cluster |
backups[].flavor.memory | Integer | Memory size (in GiB) of the flavor of the source cluster |
backups[].shards[] | Object Array | Backup information per shard in the cluster |
backups[].shards[].shardId | String | ID of the shard that was backed up Available only when cluster mode is enabled |
backups[].shards[].slots | String | Slots assigned to the shard at the time of backup Available only when cluster mode is enabled |
backups[].shards[].snapshot | Object | Snapshot information |
backups[].shards[].snapshot.startTimestamp | String | Snapshot start time (RFC3339, UTC) |
backups[].shards[].snapshot.endTimestamp | String | Snapshot end time (RFC3339, UTC) |
backups[].shards[].snapshot.fileSize | Integer | Backup file size (in bytes) |
backups[].shards[].snapshot.memorySize | Integer | Redis memory size at the time of backup (in bytes) |
backups[].shards[].upload | Object | Upload information |
backups[].shards[].upload.startTimestamp | String | Upload start time (RFC3339, UTC) |
backups[].shards[].upload.endTimestamp | String | Upload end time (RFC3339, UTC) |
backups[].deletionTimestamp | String | Scheduled deletion time (RFC3339, UTC) - For automatic backups: time is based on retentionLimit - For manual backups: null |
backups[].status | String | Status of the backup |
backups[].createdAt | String | Creation time of the backup (RFC3339) |
backups[].retentionLimit | Integer | Backup retention period (in days). For manual backups, shown as 0 |
Retrieve backup list 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", /* Automated backup */
"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", /* Manual backup */
"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
}
]
}
View backup details
Retrieve detailed information for a specific backup.
Request
Request syntax for viewing backup details
curl -X GET "https://redis.kr-central-2.kakaocloud.com/v1/backups/{backup-name}" \
-H "X-Auth-Token: {token-id}"
Type | Parameter | Type | Description |
---|---|---|---|
URL | {backup-name} * | String | Name of the backup |
Header | {token-id} * | String | Refer to API Authentication Token |
Response
Status Code | Description |
---|---|
200 | Request successful |
400 | Invalid user request |
401 | Unauthorized request |
403 | Forbidden request |
404 | Resource not found |
500 | Internal server error |
Field | Type | Description |
---|---|---|
id | String | Backup ID |
name | String | Backup name |
projectId | String | Project ID |
clusterName | String | Source cluster name of the backup |
clusterId | String | Source cluster ID of the backup |
clusterModeEnabled | Boolean | Whether cluster mode is enabled on the source cluster - true : Cluster mode enabled- false : Cluster mode disabled |
sourceType | String | Source type - scheduled : Automatic backup- manual : Manual backup |
engineVersion | String | Redis engine version of the source cluster |
flavor | Object | Flavor information of the source cluster |
flavor.id | String | Flavor ID of the source cluster |
flavor.name | String | Flavor name of the source cluster |
flavor.vcpu | Integer | Number of virtual CPUs in the source cluster's flavor |
flavor.memory | Integer | Memory size (GiB) of the source cluster's flavor |
shards[] | Object Array | Backup details by shard in the cluster |
shards[].shardId | String | Shard ID where the backup was taken - Only available when cluster mode is enabled |
shards[].slots | String | Slot ranges assigned to the shard during backup - Only available when cluster mode is enabled |
shards[].snapshot | Object | Snapshot information |
shards[].snapshot.startTimestamp | String | Snapshot start time (RFC3339, UTC) |
shards[].snapshot.endTimestamp | String | Snapshot end time (RFC3339, UTC) |
shards[].snapshot.fileSize | Integer | Backup file size (in bytes) |
shards[].snapshot.memorySize | Integer | Redis memory size at backup time (in bytes) |
shards[].upload | Object | Upload information |
shards[].upload.startTimestamp | String | Upload start time (RFC3339, UTC) |
shards[].upload.endTimestamp | String | Upload end time (RFC3339, UTC) |
deletionTimestamp | String | Scheduled deletion time (RFC3339, UTC), may be null - For automatic backups, this reflects retentionLimit - For manual backups, returns null |
status | String | Backup status |
createdAt | String | Creation timestamp (RFC3339) |
retentionLimit | Integer | Backup retention period (days). For manual backups, shown as 0 |
아래는 요청하신 **"백업 상세 정보 조회 Response Example"**의 영문 주석 버전이며, 마크다운 형식을 유지한 코드블록 안에 넣어드렸습니다.
Response Example: View backup details
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", /* Manual backup */
"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"
}
Delete backup
Delete a specific backup.
Request
Request syntax for deleting a backup
curl -X DELETE "https://redis.kr-central-2.kakaocloud.com/v1/backups/{backup-name}" \
-H "X-Auth-Token: {token-id}"
Type | Parameter | Type | Description |
---|---|---|---|
URL | {backup-name} * | String | Name of the backup |
Header | {token-id} * | String | Refer to API Authentication Token |
Response
Status Code | Description |
---|---|
200 | Request successful |
400 | Invalid user request |
401 | Unauthorized request |
403 | Forbidden request |
404 | Resource not found |
500 | Internal server error |
Response example for deleting a backup
{
"objectId": "qwerqwer-7347-4d87-a49f-e705e91db2fb"
}
Clone backup
Clone an existing backup to create a new identical backup.
- Only available when the backup status is
Available
.
Request
Clone backup 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}'
Type | Parameter | Data Type | Description |
---|---|---|---|
URL | {backup-name} * | String | Name of the backup to be cloned |
Header | {token-id} * | String | See API Authentication Token |
Body | name* | String | Name for the cloned backup - Length: 4 to 63 characters - Only lowercase letters, numbers, and hyphens ( - ) allowed- No consecutive hyphens allowed - Must start with a letter and end with a letter or number - No spaces allowed |
Clone backup Request Body Example
{
"name": "copy-backup-name"
}
Response
Status Code | Description |
---|---|
201 | Successfully created the resource |
400 | Bad request, cannot proceed |
401 | Unauthorized access |
404 | Requested resource not found |
409 | Duplicate request in current server state |
500 | Internal error, cannot process request |
Field | Data Type | Description |
---|---|---|
objectId | String | ID of the cloned backup |
Clone backup Response Example
201 OK
content-type: application/json; charset=UTF-8
{
"objectId": "qwerqwer-25a6-403f-981f-2cdd107fe3f9"
}
Upload backup to Object Storage
Uploads a specific backup to Object Storage.
- Only buckets within the same region and project with proper permissions can be used.
- Only backups in
Available
status can be uploaded. - If cluster mode is enabled, files for each shard will be created under the full path with shard numbers added to the backup name.
caution
If the API authentication token expires during upload, the operation may fail.
Request
Upload backup to 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}'
Type | Parameter | Data Type | Description |
---|---|---|---|
URL | {backup-name} * | String | Name of the backup to be exported |
Header | {token-id} * | String | See API Authentication Token |
Body | destination* | String | Path in Object Storage where the backup will be uploaded e.g. "bucket/folder/.../" |
name* | String | File name to be used during upload - Path (excluding bucket name) must be within 396 bytes (198 characters) - Special characters other than hyphen ( - ), underscore (_ ), and dot (. ) are not allowed |
Upload backup to Object Storage Request Body Example
{
"destination": "bucket/folder/file",
"name": "file-name"
}
Response
Status Code | Description |
---|---|
200 | Successfully processed the request |
400 | Bad request, cannot proceed |
401 | Unauthorized access |
403 | Forbidden, lack of permission |
404 | Requested resource not found |
409 | Duplicate request in current server state |
500 | Internal error, cannot process request |
Field | Data Type | Description |
---|---|---|
objectId | String | Backup export ID |
Upload backup to Object Storage Response Example
201 OK
content-type: application/json; charset=UTF-8
{
"objectId": "qwerqwer-25a6-403f-981f-2cdd107fe3f9"
}