Obtaining Backups
Function
This API is used to obtain backups of a DB instance.
Constraints
This API supports queries of full and incremental backups of a DB instance.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
rds:backup:list
list
-
-
-
-
URI
- URI format
GET /v3/{project_id}/backups?instance_id={instance_id}&backup_id={backup_id}&backup_type={backup_type}&offset={offset}&limit={limit}&begin_time={begin _time}&end_time={end_time}
- Parameter description
Table 1 Parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Definition
Project ID of a tenant in a region.
For details about how to obtain the project ID, see Obtaining a Project ID.
Constraints
N/A
Range
N/A
Default Value
N/A
instance_id
Yes
String
Definition
Instance ID.
Constraints
N/A
Range
N/A
Default Value
N/A
backup_id
No
String
Definition
Backup ID.
Constraints
N/A
Range
N/A
Default Value
N/A
backup_type
No
String
Definition
Backup type.
Constraints
N/A
Range
- auto: automated full backup
- manual: manual full backup
- fragment: differential full backup
- incremental: automated incremental backup
Default Value
N/A
status
No
String
Definition
Backup status.
Constraints
N/A
Range
- BUILDING: backup in progress
- COMPLETED: backup completed
- FAILED: backup failed
Default Value
N/A
offset
No
Integer
Definition
Index offset.
Constraints
N/A
Range
If offset is set to N, the resource query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value cannot be a negative number.
Default Value
0
limit
No
Integer
Definition
Number of records to be queried.
Constraints
N/A
Range
The default value is 100. The value cannot be a negative number. The minimum value is 1 and the maximum value is 100.
Default Value
100
begin_time
No
String
Definition
Query start time.
Constraints
When begin_time is not empty, end_time is mandatory.
Range
The value is in the "yyyy-mm-ddThh:mm:ssZ" format.
T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.
Default Value
N/A
end_time
No
String
Definition
Query end time.
Constraints
When end_time is not empty, begin_time is mandatory.
Range
The value is in the "yyyy-mm-ddThh:mm:ssZ" format and must be later than the query start time.
T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.
Default Value
N/A
Request Parameters
None
Example Request
GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/backups?instance_id=43e4feaab48f11e89039fa163ebaa7e4in01&backup_id=c0c9f155c7b7423a9d30f0175998b63bbr01&backup_type=auto&offset=0&limit=10&begin_time=2018-08-06T10:41:14+0800&end_time=2018-08-16T10:41:14+0800
Response
- Normal response
Table 2 Parameters Parameter
Type
Description
backups
Array of objects
Definition
Backup list. For details, see Table 3.
total_count
Integer
Definition
Total number of records.
Range
N/A
Table 3 backups field data structure description Parameter
Type
Description
id
String
Definition
Backup ID.
Range
N/A
name
String
Definition
Backup name.
Range
N/A
type
String
Definition
Backup type.
Range
- auto: automated full backup
- manual: manual full backup
- fragment: differential full backup
- incremental: automated incremental backup
size
Long
Definition
Backup size, in KB.
Range
N/A
status
String
Definition
Backup status.
Range
- BUILDING: backup in progress
- COMPLETED: backup completed
- FAILED: backup failed
- DELETING: backup being deleted
begin_time
String
Definition
Backup start time.
- For a full backup, it indicates the full backup start time.
- For an incremental backup, it indicates the time when the last transaction of the last incremental backup task is committed.
Range
The value is in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.
end_time
String
Definition
Backup end time.
- For a full backup, it indicates the full backup end time.
- For an incremental backup, it indicates the time when the last transaction is committed.
Range
The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.
datastore
Object
Definition
Database version. For details, see Table 4.
instance_id
String
Definition
ID of the instance for which the backup is created.
Range
N/A
associated_with_ddm
Boolean
Definition
Whether this instance is associated with a DDM instance.
Range
N/A
- Example normal response
{ "backups": [{ "id": "43e4feaab48f11e89039fa163ebaa7e4br01", "name": "xxxx.xxx", "type": "auto", "size": 2803, "status": "COMPLETED", "begin_time": "2018-08-06T12:41:14+0800", "end_time": "2018-08-06T12:43:14+0800", "datastore": { "type": "MySQL", "version": "5.7" }, "instance_id": "a48e43ff268f4c0e879652d65e63d0fbin01", "associated_with_ddm": false }], "total_count": 1 } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot