Setting an Automated Backup Policy
Function
This API is used to set an automated backup policy.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
URI
- URI format
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
instance_id
Yes
Specifies the DB instance ID.
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
backup_policy |
Yes |
Object |
Specifies the backup policy objects, including the backup retention period (days) and backup start time. For details, see Table 3. |
reserve_backups |
No |
Boolean |
The default value is true, indicating that automated and unsynchronized backups are retained. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
keep_days |
Yes |
Integer |
Specifies the number of days to retain the generated backup files. Value range: 1–732. To extend the retention period, contact customer service. Automated backups can be retained for up to 2,562 days. |
start_time |
No |
String |
Specifies the backup time window. Automated backups will be triggered during the backup time window. This parameter is mandatory except that the automated backup policy is disabled. The value must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format.
Example value:
|
period |
No |
String |
Specifies the backup cycle configuration. Data will be automatically backed up on the selected days every week. This parameter is mandatory except that the automated backup policy is disabled. Value range: The value is a number separated by commas (,), indicating the days of the week. For example, the value 1,2,3,4 indicates that the backup period is Monday, Tuesday, Wednesday, and Thursday. |
Example Request
PUT https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/backups/policy { "backup_policy": { "keep_days": 7, "start_time": "19:00-20:00", "period": "1,2" } }
Response
- Normal response
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error 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