Setting a Cross-Region Backup Policy
Function
This API is used to set a cross-region backup policy in the source backup region.
- Before calling an API, you need to understand the API in Authentication.
Constraints
- If the cross-region backup policy has been enabled, call the API to set the cross-region backup policy. Only the retention period can be changed.
- For RDS for MySQL and RDS for PostgreSQL DB instances, the retention period of automated full backups must be the same as that for automated incremental backups.
- For RDS for MySQL and RDS for PostgreSQL DB instances, automated incremental backup cannot be enabled unless automated full backup is enabled first.
- For RDS for MySQL and RDS for PostgreSQL DB instances, if you want to disable automated full backup and automated incremental backup, disable automated incremental backup first.
- Cross-region backup is not supported for RDS for MySQL or RDS for PostgreSQL instances with volume snapshot backup enabled.
URI
- URI format
PUT /v3/{project_id}/instances/{instance_id}/backups/offsite-policy
- Parameter description
Table 1 Parameter description Name
Mandatory
Description
project_id
Yes
Project ID of a tenant in a region.
For details about how to obtain the project ID, see Obtaining a Project ID.
instance_id
Yes
Specifies the DB instance ID.
Request
Name |
Mandatory |
Type |
Description |
---|---|---|---|
policy_para |
Yes |
Object |
Specifies the backup policy object, including the backup type, backup retention days, target region ID, and target project ID. For details, see Table 3. |
Name |
Mandatory |
Type |
Description |
---|---|---|---|
backup_type |
Yes |
String |
Specifies the backup type. For RDS for SQL Server, this parameter can only be set to all. Its value can be any of the following:
|
keep_days |
Yes |
Integer |
Specifies the number of days to retain the generated backup files. Value range: 0-1825 The value 0 indicates that the cross-region backup policy is disabled.
NOTICE:
Once the automated backup policy is disabled, automated backups are no longer created and all incremental backups, if any, are deleted immediately. Operations related to the incremental backups, including downloads, replications, restorations, and rebuilds, may fail. |
destination_region |
Yes |
String |
Specifies the target region ID for the cross-region backup policy. |
destination_project_id |
Yes |
String |
Specifies the target project ID for the cross-region backup policy. |
Example Request
- Configure a cross-region automated full backup policy for an RDS for MySQL or RDS for PostgreSQL DB instance.
PUT https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/backups/offsite-policy { "policy_para": { "backup_type": "auto", "keep_days": 7, "destination_region": "aaa", "destination_project_id": "ba1f7fc8-3307-42a7-aa6f-42c8b9b8f85c" } }
- Disable the cross-region automated full backup policy for an RDS for MySQL or RDS for PostgreSQL DB instance.
{ "policy_para": { "backup_type": "auto", "keep_days": 0, "destination_region": "aaa", "destination_project_id": "ba1f7fc8-3307-42a7-aa6f-42c8b9b8f85c" } }
- Configure a cross-region backup policy for an RDS for SQL Server DB instance.
{ "policy_para": { "backup_type": "all", "keep_days": 7, "destination_region": "aaa", "destination_project_id": "ba1f7fc8-3307-42a7-aa6f-42c8b9b8f85c" } }
- Disable the cross-region backup policy for an RDS for SQL Server DB instance.
{ "policy_para": { "backup_type": "all", "keep_days": 0, "destination_region": "aaa", "destination_project_id": "ba1f7fc8-3307-42a7-aa6f-42c8b9b8f85c" } }
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