Configuring an Online Data Migration Task
Function
This API is used to configure an online data migration task.
URI
POST /v2/{project_id}/migration/{task_id}/task
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
task_id |
Yes |
String |
Online migration task ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
migration_method |
Yes |
String |
Type of the migration, which can be full migration or incremental migration.
Enumeration values:
|
resume_mode |
Yes |
String |
Reconnection mode. In automatic reconnection mode, if the source and target instances are disconnected due to network exceptions, automatic reconnections will be performed indefinitely. Full synchronization will be triggered and requires more bandwidth if incremental synchronization becomes unavailable. Exercise caution when enabling this option. Values:
Enumeration values:
|
bandwidth_limit_mb |
No |
String |
"Bandwidth limit. For incremental migration, you can limit the bandwidth to ensure smooth service running. When the data synchronization speed reaches the limit, it can no longer increase.
|
source_instance |
Yes |
ConfigMigrationInstanceBody object |
Source Redis information. |
target_instance |
Yes |
ConfigMigrationInstanceBody object |
Target Redis information. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
String |
Redis instance ID. (If addrs is not set, id must be set.) |
addrs |
No |
String |
Redis instance address. (If id is not set, addrs must be set.) |
password |
No |
String |
Redis password. If a password is set, this parameter is mandatory. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
String |
Migration task ID. |
name |
String |
Migration task name. |
status |
String |
Migration task status. The value can be SUCCESS, FAILED, MIGRATING, or TERMINATED. Enumeration values:
|
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Error message. Maximum: 1024 |
error_code |
String |
Error code. Maximum: 9 |
error_ext_msg |
String |
Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Error message. Maximum: 1024 |
error_code |
String |
Error code. Maximum: 9 |
error_ext_msg |
String |
Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Error message. Maximum: 1024 |
error_code |
String |
Error code. Maximum: 9 |
error_ext_msg |
String |
Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Error message. Maximum: 1024 |
error_code |
String |
Error code. Maximum: 9 |
error_ext_msg |
String |
Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_msg |
String |
Error message. Maximum: 1024 |
error_code |
String |
Error code. Maximum: 9 |
error_ext_msg |
String |
Extended error information. This parameter is not used currently and is set to null. Maximum: 1024 |
Example Requests
POST https://{dcs_endpoint}/v2/{project_id}/migration/{task_id}/task { "migration_method" : "incremental_migration", "bandwidth_limit_mb" : 123, "resume_mode" : "auto", "source_instance" : { "id" : null, "addrs" : "192.168.1.1:6379,192.168.0.0:6379", "password" : "xxxxxx" }, "target_instance" : { "id" : "cf4a05df-1c38-47c5-bb5a-0a7b3673b3bd", "addrs" : null, "password" : null } }
Example Responses
Status code: 200
Online data migration task configured.
{ "id" : "90754308-a156-406f-a837-8f852f38a646", "name" : "dcs-migration-1db7", "status" : "FULLMIGRATING" }
Status Codes
Status Code |
Description |
---|---|
200 |
Online data migration task configured. |
400 |
Invalid request. |
401 |
Invalid authentication information. |
403 |
The request is rejected. |
404 |
The requested resource is not found. |
500 |
Internal service error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.