This topic describes how to return a Data Transport III device, migrate your data to the cloud, and verify the migration result after your data is migrated to the Data Transport III device and the device is powered off.
Prerequisites
Your data is migrated to a Data Transport III device, the data migration task stops, and the device is powered off.
Return the device
1. Check the data migration task status
Run the following commands in sequence to check whether the data migration task is in the succeed state, and check whether the migrated data is consistent with that in the source file by performing CRC-64 verification.:
Run the
cdmgwclientcommand to go to the corresponding directory.Run the
bash console.sh status <job_name>command to view the migration task status. Replace job_name with the actual migration task name.
2. Stop the data migration task
Make sure that you perform the following operation after the migration is complete. Otherwise, some data may fail to be migrated. You are not allowed to power off the device before you stop the task.
Run the following commands in sequence to stop the data migration task:
beforepoweroff
3. Uninstall and lock a storage pool
Run the following command to uninstall and lock a storage pool:
crypt close
4. Power off the Data Transport III device
Run the poweroff command to power off the device.
5. Check accessories
Make sure that the four optical transceiver modules are installed on a 25 Gbit/s optical port.
Make sure that the two power cords are complete.
Return the Data Transport III device through the specified logistics company that cooperates with Alibaba Cloud.
Migrate data to the cloud and verify the migration result
Grant permissions to a RAM role
Alibaba Cloud uses a specific RAM role to upload data in the Data Transport III device to the Object Storage Service (OSS) bucket that you specified. You must grant the required permissions to the RAM role. Perform the following steps to grant the required permissions to the RAM role:
If you use bucket policies to grant permissions to the RAM role by specifying policy statements, the new policy statement overwrites the existing policy statement. Make sure that the new policy statement contains the content of the existing policy statement. Otherwise, operations related to the existing policy statement may fail.
Log on to the OSS console.
In the left-side navigation pane, click Buckets and click the name of the desired bucket.
In the left-side navigation pane, choose Permission Control > Bucket Policy.
On the Bucket Policy tab, select Add by Syntax. In the editor, click Edit, specify a custom bucket policy, and then click Save.
Grant the RAM role the permissions to list, read, and delete objects in and write objects to the destination bucket.
The following policy statement is for your reference only. Replace the following parameters with the actual values. Do not retain angle brackets (<>).
<mybucket>: Specify the name of the destination bucket.
<myuid>: Specify the UID of the Alibaba Cloud account to which the destination bucket belongs.
Replace only the preceding parameters. In this example, a RAM user whose UID is 1737441177608761 and whose name is mgw-data-transport-role is used. For more information about the RAM policies for OSS, see Common examples of RAM policies.
{
"Version": "1",
"Statement": [
{
"Effect": "Allow",
"Action": [
"oss:List*",
"oss:Get*",
"oss:Put*",
"oss:AbortMultipartUpload"
],
"Principal": [
"arn:sts::1737441177608761:assumed-role/mgw-data-transport-role/*"
],
"Resource": [
"acs:oss:*:<myuid>:<mybucket>",
"acs:oss:*:<myuid>:<mybucket>/*"
]
}
]
}Migrate data to the cloud
Alibaba Cloud uses a specific RAM role that has the required permissions to migrate the data in the Data Transport III device to the cloud. After the data is migrated to the cloud, Alibaba Cloud provides you with a data migration report. You can verify the migration results based on the data migration report. At this point, the data migration task is complete.
After the data migration task is complete, the data migration report is stored in a specific OSS bucket. For more information, see the Data migration report section.
Data migration report
After a data migration report is generated, the migration report files are stored in a specific OSS bucket. The directories in which migration report files are stored are shown in the following code block:
OSS://<bucket>/<prefix>/aliyun_import_report/<uid>/<jobid>/<runtimeid>/total_list/
OSS://<bucket>/<prefix>/aliyun_import_report/<uid>/<jobid>/<runtimeid>/failed_list/
OSS://<bucket>/<prefix>/aliyun_import_report/<uid>/<jobid>/<runtimeid>/skipped_list/Field | Description |
bucket | The OSS bucket to which data is migrated. |
prefix | The prefix contained in the name of the directory in the bucket to which you migrate the data. |
uid | The UID provided by Alibaba Cloud: 1737441177608761. |
jobid | The data migration task ID provided by Alibaba Cloud. |
runtimeid | The execution record ID of the data migration task. This ID is provided by Alibaba Cloud. |
A migration report contains three types of files: the file that lists all files that are migrated, the file that lists the files that failed to be migrated, and the file that lists the files that are skipped during migration. You can download these files and view them for more details. We recommend that you use ossutil 1.0 to view these files.
Rules for naming the migration report files
A file named uid@jobid@runtimeid_total_list_n lists all files to be migrated. One or more files of this type may exist. The value of n is an integer greater than or equal to 0.
A file named uid@jobid@runtimeid_failed_list_n lists the files that fail to be migrated. One or more files of this type may exist. The value of n is an integer greater than or equal to 0.
A file named uid@jobid@runtimeid_skipped_list_n lists the files that are skipped during migration. One or more files of this type may exist. The value of n is an integer greater than or equal to 0.
The fields contained in the migration report files describe various attributes of the files during the migration from the Data Transport III device to the destination bucket. The following table describes the fields.
Field | Description |
srcObjectName | The name of the source file. |
destObjectName | The name of the destination file. |
srcObjectSize | The size of the source file. |
destObjectSize | The size of the destination file. |
srcContentMd5 | The MD5 hash value of the source file, which is used for data consistency verification. |
destContentMd5 | The MD5 hash value of the destination file, which is used for data consistency verification. |
srcCrc64 | The CRC-64 value of the source file, which is used for data consistency verification. |
destCrc64 | The CRC-64 value of the destination file, which is used for data consistency verification. |
srcLastModified | The time when the source file was last modified. |
destLastModified | The time when the destination file was last modified. |
srcVersionId | This field is left empty. |
destVersionId | This field is left empty. |
startTime | The time when the migration started. |
endTime | The time when the migration was complete. |
isAbnormal | Indicates whether an exception occurred during migration. A value of false indicates that no exception occurred. A value of true indicates that an exception occurred. |
detailMsg | The cause of the exception. |
Verify the migration result
Data Transport only migrates data and does not ensure data consistency or integrity. After the migration task is complete, you must check all the migrated data and verify the data consistency between the source and destination data addresses. You must also revoke the permissions on the Data Transport III device granted to the specified RAM role.
Make sure that you verify the migrated data at the destination after the migration task is complete. If you delete the source data without verifying data consistency between the source and destination data addresses, you are responsible for any losses and consequences that may arise.