Querying Details of a Backup Migration Task
Function
This API is used to obtain detailed information of a specific backup migration task.
URI
GET /v5/{project_id}/backup-migration-jobs/{job_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. |
job_id |
Yes |
String |
ID of a backup migration task. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
MIME type of a request body. Use the default value application/json. For APIs used to upload objects or images, the value varies depending on the flow type. |
X-Auth-Token |
Yes |
String |
User token obtained from IAM. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a request is processed, the value of X-Subject-Token in the header is the token value. |
X-Language |
No |
String |
Request language type.
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
String |
Task ID. |
status |
String |
Task status. |
create_time |
String |
Time when a task is created. |
finish_time |
String |
Time when a task is complete. |
backup_info |
BackupInfoResp object |
Backup file information. |
base_info |
BackupJobBaseInfo object |
Basic information body for creating a backup migration task. |
target_db_info |
BackupJobEndpointInfo object |
RDS for SQL Server instance information to be restored for a backup migration task. |
options |
BackupRestoreOptionInfo object |
Configuration parameters related to backup migration. |
new_db_names |
String |
New name of the mapped database for data backup and restoration. |
instance_name |
String |
Name of the RDS DB instance. |
error_log |
String |
Indicates causes of a failed migration task. |
Parameter |
Type |
Description |
---|---|---|
file_source |
String |
Backup file source. The value can be OBS or RDS. |
bucket_name |
String |
OBS bucket name. |
file_info |
Array of BackupFileResp objects |
List of backup files. |
Parameter |
Type |
Description |
---|---|---|
file_name |
String |
File name. |
file_size |
String |
The size of a backup file. |
file_last_modify |
String |
The last time when the backup file is modified. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Task name. The task name can be 4 to 50 characters in length. It is case-insensitive and can contain only letters, digits, hyphens (-), and underscores (_). - Minimum length: 4 - Maximum length: 50 |
engine_type |
String |
DB engine. - sqlserver: RDS for SQL Server |
description |
String |
Task description. |
tags |
Array of ResourceTag objects |
Tag information. A tag value can contain letters, digits, spaces, and the following characters: _.:/=+-@ |
enterprise_project_id |
String |
Enterprise project ID. |
Parameter |
Type |
Description |
---|---|---|
key |
String |
The tag key. The value can contain a maximum of 36 characters, including letters, digits, underscores (_), and hyphens (-). |
value |
String |
The tag value. The value can contain letters, digits, spaces, and the following characters: _ . : / = + - @ |
Parameter |
Type |
Description |
---|---|---|
target_instance_id |
String |
ID of the RDS for SQL Server instance to be restored for a backup migration task. |
ms_file_stream_status |
String |
Whether FileStream is enabled for the destination instance. You can obtain the value from the API for querying RDS for SQL Server details. |
file_id |
String |
ID of the RDS for SQL Server backup file. This parameter is mandatory when full RDS backup is used for restoration. You can obtain the value from the RDS backup management page. |
Parameter |
Type |
Description |
---|---|---|
is_cover |
Boolean |
Whether to overwrite the destination database. The default value is false. true: indicates the destination database is overwritten. false: indicates the destination database is not overwritten. |
is_default_restore |
Boolean |
Whether to restore all databases by default. true: indicates all databases in the backup file are restored by default. false: indicates that you need to specify the name of the database to be restored in the db_names field. |
is_last_backup |
Boolean |
A complete restoration process involves restoring several incremental backup files. The destination DB instance will not be available until the last backup file is restored. You can determine whether the selected backup file is the last one. Select Yes in either of the following scenarios: If you perform a one-time full migration only, set this parameter to true. If you perform an incremental migration and set the selected file as the last incremental backup file during a cutover migration, set this parameter to false. |
is_precheck |
Boolean |
Whether to perform pre-verification. true: Perform a pre-verification. false: Do not perform a per-verification. |
recovery_mode |
String |
Restoration mode. full: indicates a full migration. incre: indicates an incremental migration. |
db_names |
Array of strings |
Database name. |
reset_db_name_map |
Map<String,String> |
This field is a map. Currently, the format key is "", and value indicates the name of the new database. If you enable Reset Database Name, the original database names in the backup file will be reset to new database names. Constraints:
|
is_delete_backup_file |
Boolean |
Whether to delete the OBS backup file downloaded to the RDS for SQL Server disk when the backup file in the OBS bucket is used for restoration. By default, the backup file is deleted.
|
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
Querying details about a backup migration task
https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/backup-migration-jobs/341de3a3-c58a-445d-82e3-8e062b6jb703
Example Response
Status code: 200
OK
{ "id" : "0667845a-6291-4e2a-95b0-190c0abjb703", "status" : "SUCCESS", "create_time" : "2024-08-19T02:27:15Z", "finish_time" : "2024-08-19T02:29:03Z", "backup_info" : { "file_source" : "OBS", "bucket_name" : "zyy-obs", "file_info" : [ { "file_name" : "1706510914000_1_Test_Database.bak", "file_size" : "704KB", "file_last_modify" : "1706511360000" } ] }, "base_info" : { "name" : "DRS-6813", "engine_type" : "sqlserver", "enterprise_project_id" : "0", "description": "Destination RDS instance name: rds-sqlserver2022-stand" }, "target_db_info" : { "target_instance_id" : "0a3182607bc549bcb46cc9a8755761a6in04" }, "options" : { "is_cover" : true, "is_default_restore" : true, "is_last_backup" : false, "is_precheck" : true, "is_delete_backup_file" : false, "recovery_mode" : "full", "db_names" : [ ] }, "new_db_names" : "[]", "instance_name" : "" }
Status code: 400
Bad Request
{ "error_code" : "DRS.10000010", "error_msg" : "Job does not exist, please check job ID." }
Status Code
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
Error Code
For details, see Error Code.
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