Help Center/ GeminiDB/ API Reference/ APIs v3 (Recommended)/ Backups and Restorations/ Importing a Data File to an Existing Instance
Updated on 2025-10-17 GMT+08:00

Importing a Data File to an Existing Instance

Function

This API is used to import data to an existing instance.

Constraints

This API supports the following instance type:

  • GeminiDB Redis

Data cannot be imported to an instance that is being restored.

Currently, only RDB files can be imported.

URI

POST /v3/{project_id}/redis/instances/{instance_id}/recovery

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Explanation:

Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID.

Constraints:

N/A

Values:

N/A

Default value:

N/A

instance_id

Yes

String

Explanation:

Instance ID, which can be obtained by calling the API in Querying Instances and Details. If you do not have an instance, call the API by following Creating an Instance.

Constraints:

N/A

Values:

N/A

Default value:

N/A

Request Parameters

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

x-auth-token

Yes

String

Explanation:

User token

To obtain this value, call the IAM API for obtaining a user token.

Constraints:

N/A

Values:

N/A

Default value:

N/A

Table 3 Request body parameter

Parameter

Mandatory

Type

Description

recovery_info

No

RecoveryInfo object

Explanation:

Information about the OBS where a backup file is stored

Constraints:

N/A

Values:

N/A

Default value:

N/A

Table 4 RecoveryInfo

Parameter

Mandatory

Type

Description

bucket_name

Yes

String

Explanation:

OBS bucket where a backup file is stored

Constraints:

N/A

Values:

N/A

Default value:

N/A

files

Yes

Array of strings

Explanation:

Backup file name

Constraints:

N/A

Values:

N/A

Default value:

N/A

Response Parameters

Status code: 202

Table 5 Response body parameter

Parameter

Type

Description

job_id

String

Explanation:

Task ID

Constraints:

N/A

Values:

N/A

Default value:

N/A

Example Request

Restoring data using an RDB backup

POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/redis/instances/a4d8ea2584e047439a667703c0684119in06/recovery    {  
  "recovery_info" : 
 { 
    "bucket_name" : "test-bucket",  
    "files" : [ "file1.rdb", "file2.rdb" ]  
  } 
}

Example Response

Status code: 202

Successful request

{    
  "job_id" : "f85104b5-4a9c-4e0f-9505-fc5409d8f7ae"  
}

Status Codes

See Status Codes.

Error Codes

See Error Codes.